Decode G711(PCM u-law)

后端 未结 2 1048
无人及你
无人及你 2021-01-22 02:10

Please bear with me as my understanding of audio codec is limited. I have this audio source from a IPCAM (through a htto//... CGI interface). I am trying to write several clie

相关标签:
2条回答
  • 2021-01-22 02:24

    You may find this useful:

    u-Law companding algorithm in C

    0 讨论(0)
  • 2021-01-22 02:30

    It depends on what API you are using to play sound, but most require linear PCM and you have µ-law PCM, so unless your API supports µ-law playback you will need to convert the µ-law sample values to linear.

    With G.711 the compressed µ-law samples are 8 bits and these will be converted to 14 bit linear values which you will store in a buffer as 2 bytes per sample. There is a brief description of the µ-law encoding on the G.711 Wikipedia page.

    0 讨论(0)
提交回复
热议问题