I want to transmit a stereo audio stream with 48K rate (which corresponds to 768 Kbit per channel at 16-bit samples) via a radio channel, and feed it to a DAC using a Cortex-M3 microcontroller. While the channel technically works at 2 Mbit, range degrades quickly with speed, and I want to optimize it to a certain degree.
Is there any lossless audio codec which can work on a microcontroller with ~8K of RAM, approx. 20 MIPS of processing power, a 32-bit hardware multiplier and no hardware divisor? I don't need a great compression ratio, but it should handle stream errors correctly and without long pauses in the playback.
Xiph.org's FLAC might be embeddable - see the "Embedded Developer" section at the bottom of this page. It is fixed point, fast. open source, and fairly widely supported. I haven't tried it, but I did use the embedded version of their Ogg Vorbis decoder (Tremor), and found it reasonably easy to up and running.
Instead of, or maybe as well as using a audio compression, you should also consider down sampling to a lower sample rate.
You will also need to consider the robustness of your wireless connection. This will also eat into your overall wireless bandwidth as you may have look at error correction techniques.
Both of these issues depends on the quality of the audio required.
The Linux JACK program I think utilizes a CELT Audio Codec(Lossy) that you may want to look at.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With