Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: G.727 Support

$
0
0

Thank you very much. Your statements were very helpful. I had some problems calling the ADPCM.dll properly. But now it seems to work mostly.

Unfortunately only mostly, because the library proccesses the G.727 data only in 512 byte blocks. This results in the following ALaw block sizes:

2-bit: 2048 bytes
3-bit: 1365 bytes
4-bit: 1024 bytes
5-bit: 819 bytes

The Read() method asks for a 2880 byte buffer to be filled. If I use 4-bit samples I process two blocks, fill 2048 bytes and return this 2048. But then the next Read() call asks for the remaining 832 bytes which are less than the library can process.

That leaves me with two possibilities:
1.) Regulate NAudio to ask for the right buffer size
2.) Process three blocks, fill exactly 2880 bytes and buffer the remaining 192 bytes for the next time

Is 1.) possible?

Best wishes


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>