Clear Filters
Clear Filters

How to convert audio file in binary form for further processing it in LSB.

2 views (last 30 days)
How an audio file is converted into digital and binary form,and how the samples are created. How many bits does a sample consist.

Answers (1)

Walter Roberson
Walter Roberson on 7 Feb 2014
Audio files are already in digital form and already stored in binary.
The samples are created by programs creating samples directly, or by using (and perhaps modifying) microphone inputs that have been converted to digital form by a sound card or A/D convertor or DSP.
There is no finite limit on the number of bits per sample, but the built-in MATLAB routines do not expect more than 64 bits per sample.
I think you probably asked the wrong questions. I suspect the questions you wanted to ask are answered by here in particular audioread() and audiowrite(), together with dec2bin() and bin2dec(). See in particular the audiowrite() "BitsPerSample" parameter.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!