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[] = {"SBC_FREQ_16000", "SBC_FREQ_32000",
35 "SBC_FREQ_44100", "SBC_FREQ_48000"};
36 const OI_CHAR* const OI_CODEC_SBC_ModeText[] = {"SBC_MONO", "SBC_DUAL_CHANNEL", "SBC_STEREO",
37 "SBC_JOINT_STEREO"};
38 const OI_CHAR* const OI_CODEC_SBC_SubbandsText[] = {"SBC_SUBBANDS_4", "SBC_SUBBANDS_8"};
39 const OI_CHAR* const OI_CODEC_SBC_BlocksText[] = {"SBC_BLOCKS_4", "SBC_BLOCKS_8", "SBC_BLOCKS_12",
40 "SBC_BLOCKS_16"};
41 const OI_CHAR* const OI_CODEC_SBC_AllocText[] = {"SBC_LOUDNESS", "SBC_SNR"};
42
43 #ifdef OI_DEBUG
OI_CODEC_SBC_DumpConfig(OI_CODEC_SBC_FRAME_INFO * frameInfo)44 void OI_CODEC_SBC_DumpConfig(OI_CODEC_SBC_FRAME_INFO* frameInfo) {
45 printf("SBC configuration\n");
46 printf(" enhanced: %s\n", frameInfo->enhanced ? "true" : "false");
47 printf(" frequency: %d\n", frameInfo->frequency);
48 printf(" subbands: %d\n", frameInfo->nrof_subbands);
49 printf(" blocks: %d\n", frameInfo->nrof_blocks);
50 printf(" channels: %d\n", frameInfo->nrof_channels);
51 printf(" mode: %s\n", OI_CODEC_SBC_ModeText[frameInfo->mode]);
52 printf(" alloc: %s\n", OI_CODEC_SBC_AllocText[frameInfo->alloc]);
53 printf(" bitpool: %d\n", frameInfo->bitpool);
54 }
55 #endif /* OI_DEBUG */
56
57 /**@}*/
58