framing-sbc.c 2.5 KB

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