When I run the program on the target, it gives undefined symbols "dpmul", "dpdiv", "dpadd", "dptoi". These symbols are from the floating point library. I do have Math/C/GCC library loaded. Can anyone out there has some experience of dealing with this kind of error or some other workaround. Any pointers will be greatly appreciated.
Where are you getting your cross-compiler?
I have my own cross compiler, GCC 2.95.3.
If you're building gcc by hand, well, things are a little more complicated. If you are, could you tell us how your configuring >gcc?
I am configuring the GCC as... working in gcc-build> and have /usr/local/toshiba/bin in my path.
../gcc-2.95.3/configure --nfp --target=mipstx39-linux --prefix=/usr/local/toshiba --enable-shared --with-gnu-ld --with-gnu-as --with-newlib
cd libiberty ../../gcc-2.95.3/configure --nfp --target=mipstx39-linux --prefix=/usr/local/toshiba --enable-shared --with-gnu-ld --with-gnu-as --with-newlib
cd ..
make cross make install-cross
Then build GLIBC and again revisiting GCC by configurinng the GCC the same way except removing option --with-newlib and adding --with-headers=/usr/local/toshiba/include --with-libs=/usr/local/toshiba/lib
Jay
Thanks Rajneesh
Dear Sir,
I have downloaded a Perl Script to record mp3 stream from ShoutCast server. Now my task is need to determine the property of the mp3 stream:
1) whether it is stereo, joint-stereo or mono 2) whether it is a 11kHz, 22kHz, or 44kHz sampling rate stream 3) whether the bit rate is 16KHz, 32kHz, 64kHZ or 128kHz
The problem is there are a lot of junk before the stream begin, and there is so many consecutive 12 or 11 1's in the program ( for those who dont understand what I mean, please see document of mpeg header). I have trouble determining the begin of of MP3 stream!! Some decoder does not have this ability and I must tell it the begin of MP3 stream.
Can any one point out where I can find the C/C++ source code to do that?
Yick
Lam Yick Yan wrote:
I have downloaded a Perl Script to record mp3 stream from ShoutCast
server. Now my task is need to determine the property of the mp3 stream:
whether it is stereo, joint-stereo or mono
whether it is a 11kHz, 22kHz, or 44kHz sampling rate stream
whether the bit rate is 16KHz, 32kHz, 64kHZ or 128kHz
The problem is there are a lot of junk before the stream begin,
and there is so many consecutive 12 or 11 1's in the program ( for those who dont understand what I mean, please see document of mpeg header). I have trouble determining the begin of of MP3 stream!! Some decoder does not have this ability and I must tell it the begin of MP3 stream.
Can any one point out where I can find the C/C++ source code
to do that?
This algorithm works pretty well to find correct sync words:
1. Search forward for the next sync word (0xfff or 0xffe for MPEG 2.5). 2. Try to decode the header. If any field is invalid ("forbidden"), the sync word was false; go back to 1. 3. Use the layer, bitrate, sampling frequency, and padding bit to calculate the frame size (and hence, beginning of the next frame.) 4. Verify that a sync word follows at the calculated location. If not, the original sync word was false; go back to 1.
This is what libmad does, generally. For additional verification of a correct sync, you can also:
5. Decode the next frame header. If any field is invalid ("forbidden"), the original sync word was false; go back to 1. 6. Verify that the layer and sampling frequency of the second header match the first. If not, the original sync word was likely false; go back to 1.
These additional checks are performed by libmad only when trying to determine a free format bitrate.
If the stream has CRC protection, you could also use that for additional verification, but the above is pretty effective in most cases.
citing Lam Yick Yan superylam@netscape.net:
Hi,
The problem is there are a lot of junk before the stream begin,
and there is so many consecutive 12 or 11 1's in the program ( for those who dont understand what I mean, please see document of mpeg header). I have trouble determining the begin of of MP3 stream!! Some decoder does not have this ability and I must tell it the begin of MP3 stream.
Can any one point out where I can find the C/C++ source code
to do that?
There's a possibility to find out the correct sync start of the mp3 file. Just search your stream for the first occurence of the 0xff byte, then try to decode the header with mad_header_decode(). If it returns -1, the header was not a valid one. It still might be, that a successfully decoded frame header might not be the real one.
If you want to look at some source, look at: http://cvs.sourceforge.net/cgi- bin/viewcvs.cgi/winlame/winlame/source/winlame/encoder/wlMadMpegInputModule.cpp
I just recently built the detection of valid MPEG frames into winLAME.
bye Michael