libmpcdec
1.2.2
|
libmpcdec is a library that decodes musepack compressed audio data. Musepack is a free, high performance, high quality lossy audio compression codec. For more information on musepack visit http://www.musepack.net.
Using libmpcdec is very straightforward. There are typically four things you must do to use libmpcdec in your application.
The role of the mpc_reader is to provide raw mpc stream data to the mpc decoding library. This data can come from a file, a network socket, or any other source you wish.
See the documentation of mpc_reader for more information.
This is a simple matter of calling the streaminfo_init() and streaminfo_read() functions, supplying your mpc_reader as a source of raw data. This reads the stream properties header from the mpc stream. This information will be used to prime the decoder for decoding in the next step.
This is just a matter of calling the mpc_decoder_setup() and mpc_decoder_initialize() functions with your mpc_decoder, mpc_reader data source and streaminfo information.
Once you've initialized the decoding library you just iteratively call the mpc_decoder_decode routine until it indicates that the entire stream has been read.
For a simple example of all of these steps see the sample application distributed with libmpcdec in src/sample.cpp.