Question

I have a stream of u-Law compressed PCM data I am extracting from a Camera, I need to play this out the speakers? Anybody know how? I've tried decoding the u-Law into normal WAV Data and then use SoundPlayer but it never seems to work! Always SoundPlayer only supports PCM Data?

I know the sounds ok, because I have saved it to a file (using a custom createWavHeader method) and iTunes can play it.

Was it helpful?

Solution

Windows comes with an ACM codec to convert u-law to PCM. You can use NAudio and use the WaveFileReader and the WaveFormatConversionStream to get a PCM stream you can play easily.

OTHER TIPS

Similarly, there is a freeware library lizPlay providing PCM playing capabilities. Worth considering as developers of lizPlay pay special attention to ensure there is a version that is free of patent infringement issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top