A while ago I wrote in newlc.com created for the Series 60 MP3 player program. I have received a lot about the MP3 decoder and the message used in Symbian. Here using Symbian in MAD (MPEG audio decoder library) use to solve the problem.
For Symbian 7.0 smartphones can play through the MMF in the MP3, but if your phone does not support MP3 decode, or if you want your receiver decode MP3. Here I will demonstrate how to use Symbian in the MAD (MPEG audio decoder, libmad) usage.
Why MAD? Because it is a high-quality MPEG audio decoder, and it has been tested through the ARM (ie, different computers, and handheld MP3 can use it). The MAD transplanted to Symbian.
MAD to get source, will need the following documents:
Fixed static function / variable non-static. (Variable can be converted to "static const").
Edit mad.h,, for the device object and FPM_DEFAULT defined FPM_ARM. If your compiler does not support WINS big inline, need to do:
Layer3.c III_decode function may cause a stack error, that is, the string:
mad_fixed_t xr  ;
You can allocate memory for the variable or (in the case of a simple procedure) to use for the WINS target tips, home into a static variable. In the real machine it is running properly.
imdct_l_arm.S is optimized for ARMI, use it to add its header (function III_imdct_l).
# Ifndef __WINS__
void III_imdct_l (mad_fixed_t const X , mad_fixed_t z , unsigned int block_type);
void III_imdct_l (mad_fixed_t const X , mad_fixed_t z , unsigned int block_type)
Attention! Optimized imdct_l_arm not THUMB compile, so just ARMI object is used.
Creating MP3 Decoder Dynamic Link Library
Using the MP3 decoder is the best way to DLL, you can compile one or effective number, there is no platform for special events. So use ETTYPE. As libmad to epoc32includelibc join in the MM file SYSTEMINCLUDE. If you want to use the optimized III_imdct_l function, added to the MMP:
# If! Defined (WINS)
Similarly to bld.inf: (So imdct_l_arm on the THUMB compiler)
If iii_decode function for the stack error in the WINS database using the tips and not _chkstk, need to add it (empty void _chkstk ()):
In order to use the program DLL, add the function.
You can use the MP3 decoder based madplay the main loop:
Read file to buffer
MP3 decoding structure
Synthesis of decoding to PCM samples
PCM samples to re-take
Filter most of the Symbian smartphones do not support stereo playback, so here you can implement a single voice synthesis. And can use the balancer.
Frequency does not need to do unnecessary calculations, if the frequency is greater than the required flow of current frames, the frequency of the half, after applying filter change frames options:
Frame.options | = MAD_OPTION_HALFSAMPLERATE;
Editors compile the procedure using GCC 3. According to my tests it's GCC 2.95 than the average 20% faster decoder. Do not forget the MAD in the GNU General Public License version 2 is licensed under.
Hope that the article can help you, and welcome to write notes or valuable opinions.
Recommend Office Suites And TOOLS
Describe The C # Call An External Process
EVALUATION Nature - Screen Savers
Total Video Converter
The birth of Kissing fish
Expert Backup And Restore
VBScript ReDim Statement
First job Out of the ivory tower beginning how the election
11 Ways Computer Viruses Are Spread
College student hidden hard to guarantee the right to life and health worries
Wizard Personal Interest
Using De exterminate RABBITS annoying ads RMVB movies