Click here to Skip to main content
14,972,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I wrote a program to take samples of the sound signal with lpc1768
but
to reach Good quality sample rate should be take at least 40 to 50 k samples is that each sample is 12 bits so the volume occupies is too much
So I need to use an algorithm or library that can compress it for me
i looking for a library and
but I do not know how to use this library for lpc1768
Now is there anyone here who can help me?!

What I have tried:

i find mini lzo and lame mp3 encoder
but lame is heavy for lpc1768
and don't know how to use mini lzo
Posted
Updated 2-Dec-16 7:33am

Have a look at Zlib. It is used for PNG image compression and is lossless. Plus, you can find the source code written in plain, old C. It is capable of in-memory compression so it should be able to do exactly what you want.
   
You may use a mp3 decoding library, see this paper: "Audio Player Design Example"[^] though, at first glance it looks you need a more powerful chip.
   
How long of a sample do you think you're going to fit in 32KB of RAM? I certainly hope you're offloading the storage of this sample to something else besides the uC or are streaming the samples to a PC or something bigger.

If you're not, you are going to need to move up to a bigger uC with more memory or storage.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900