Home | History | Annotate | Download | only in srce
      1 /******************************************************************************
      2  *
      3  *  Copyright 2014 The Android Open Source Project
      4  *  Copyright 2003 - 2004 Open Interface North America, Inc. All rights
      5  *                        reserved.
      6  *
      7  *  Licensed under the Apache License, Version 2.0 (the "License");
      8  *  you may not use this file except in compliance with the License.
      9  *  You may obtain a copy of the License at:
     10  *
     11  *  http://www.apache.org/licenses/LICENSE-2.0
     12  *
     13  *  Unless required by applicable law or agreed to in writing, software
     14  *  distributed under the License is distributed on an "AS IS" BASIS,
     15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16  *  See the License for the specific language governing permissions and
     17  *  limitations under the License.
     18  *
     19  ******************************************************************************/
     20 
     21 /*******************************************************************************
     22   $Revision: #1 $
     23  ******************************************************************************/
     24 
     25 /** @file
     26 @ingroup codec_internal
     27 */
     28 
     29 /**@addgroup codec_internal*/
     30 /**@{*/
     31 
     32 #include "oi_codec_sbc_private.h"
     33 
     34 const OI_CHAR* const OI_CODEC_SBC_FreqText[] = {
     35     "SBC_FREQ_16000", "SBC_FREQ_32000", "SBC_FREQ_44100", "SBC_FREQ_48000"};
     36 const OI_CHAR* const OI_CODEC_SBC_ModeText[] = {
     37     "SBC_MONO", "SBC_DUAL_CHANNEL", "SBC_STEREO", "SBC_JOINT_STEREO"};
     38 const OI_CHAR* const OI_CODEC_SBC_SubbandsText[] = {"SBC_SUBBANDS_4",
     39                                                     "SBC_SUBBANDS_8"};
     40 const OI_CHAR* const OI_CODEC_SBC_BlocksText[] = {
     41     "SBC_BLOCKS_4", "SBC_BLOCKS_8", "SBC_BLOCKS_12", "SBC_BLOCKS_16"};
     42 const OI_CHAR* const OI_CODEC_SBC_AllocText[] = {"SBC_LOUDNESS", "SBC_SNR"};
     43 
     44 #ifdef OI_DEBUG
     45 void OI_CODEC_SBC_DumpConfig(OI_CODEC_SBC_FRAME_INFO* frameInfo) {
     46   printf("SBC configuration\n");
     47   printf("  enhanced:  %s\n", frameInfo->enhanced ? "true" : "false");
     48   printf("  frequency: %d\n", frameInfo->frequency);
     49   printf("  subbands:  %d\n", frameInfo->nrof_subbands);
     50   printf("  blocks:    %d\n", frameInfo->nrof_blocks);
     51   printf("  channels:  %d\n", frameInfo->nrof_channels);
     52   printf("  mode:      %s\n", OI_CODEC_SBC_ModeText[frameInfo->mode]);
     53   printf("  alloc:     %s\n", OI_CODEC_SBC_AllocText[frameInfo->alloc]);
     54   printf("  bitpool:   %d\n", frameInfo->bitpool);
     55 }
     56 #endif /* OI_DEBUG */
     57 
     58 /**@}*/
     59