Hi.
I was looking through the MAD examples (minimad and madplay) in order for me to integrate MAD into Apollo. It became apparent pretty quickly that this is no easy task, with just one of the files for the madplay example touching 2000 lines of compact, fairly complex code. That combined with no documentation easily destroyed most of my motivation.
I wondered if anybody has written a fairly decoupled C++ wrapper class. It doesn't have to be quite:
A C++ wrapper (GPL) can be found in GMSP:
www.tfh-berlin.de/~s712059/gsmp/index.html
(file GSMP/[src,include]/MADHelper.[hh,cc] )
MP3File m("my_song.mp3"); m.play();
OK. With this wrapper it isn't that easy! ;-) - But you have a open/read/seek/ close style interface to read and seek in the MP3 file ...
but at least closer to that than to the 2000+ line example included.
Yes closer to that 2000+ lines.
Two draw-backs:
1. It is still in development and sometimes outputs a) -1152 samples before the pos you requested b) other unmatching data (fixed in some hours / days) 2. First seeking is a bit slow because: we need sample accurate seek in GSMP -> And so we can not use the pi * thumb "guessing" found in normal player only software.
- Marius Sundbakken Apollo Developer: http://www.apolloplayer.org
k33p h4ck1n6 René
Assert.h and assert() macro dont exist in MS Embedded VisualC, as well as sys/types.h, fcntl.h and errno.h. The last 3 can be ifdef'ed out, for the assert macro I just put something like this in
#ifdef _WIN32_WCE # include <windows.h> #define assert ASSERT #else # include <assert.h> #endif
There are also a heap of warnings that appear that I can list if wanted.
Brett
PS, mad works pretty well on the jornada and ipaq. It takes about 15% cpu on the ipaq to play a stereo mp3 with opt_speed on and no asm, and about 55% on the jornada (well not great but its a crap cpu).
-----Original Message----- From: mad-dev-admin@lists.mars.org
[mailto:mad-dev-admin@lists.mars.org]
On Behalf Of Rene Rebe Sent: Sunday, 28 October 2001 1:44 PM To: mad-dev@lists.mars.org Subject: [mad-dev] (no subject)
Hi.
I was looking through the MAD examples (minimad and madplay) in
order
for
me to integrate MAD into Apollo. It became apparent pretty quickly that this is no easy task, with just one of the files for the
madplay
example touching 2000 lines of compact, fairly complex code. That
combined
with no documentation easily destroyed most of my motivation.
I wondered if anybody has written a fairly decoupled C++ wrapper
class.
It
doesn't have to be quite:
A C++ wrapper (GPL) can be found in GMSP:
www.tfh-berlin.de/~s712059/gsmp/index.html
(file GSMP/[src,include]/MADHelper.[hh,cc] )
MP3File m("my_song.mp3"); m.play();
OK. With this wrapper it isn't that easy! ;-) - But you have a open/read/seek/ close style interface to read and seek in the MP3 file ...
but at least closer to that than to the 2000+ line example included.
Yes closer to that 2000+ lines.
Two draw-backs:
- It is still in development and sometimes outputs a) -1152 samples
before the pos you requested b) other unmatching data (fixed in some hours / days) 2. First seeking is a bit slow because: we need sample accurate seek
in
GSMP -> And so we can not use the pi * thumb "guessing" found in normal
player
only software.
- Marius Sundbakken Apollo Developer: http://www.apolloplayer.org
k33p h4ck1n6 René
-- René Rebe (Registered Linux user: #127875)
eMail: rene.rene@gmx.net rene.rebe@rocklinux.org
Homepage: http://www.rene.rebe.myokay.net/
Anyone sending unwanted advertising e-mail to this address will be charged $25 for network traffic and computing time. By extracting my address from this message or its header, you agree to these terms.
Brett Paterson wrote:
Assert.h and assert() macro dont exist in MS Embedded VisualC, as well as sys/types.h, fcntl.h and errno.h. The last 3 can be ifdef'ed out, for the assert macro I just put something like this in
#ifdef _WIN32_WCE # include <windows.h> #define assert ASSERT #else # include <assert.h> #endif
Thanks; I'll try to incorporate a fix for these in the next release.
There are also a heap of warnings that appear that I can list if wanted.
I'm sure most if not all of the warnings can be ignored. I suggest changing the warning level for libmad to 1 and madplay to 2.
PS, mad works pretty well on the jornada and ipaq. It takes about 15% cpu on the ipaq to play a stereo mp3 with opt_speed on and no asm, and about 55% on the jornada (well not great but its a crap cpu).
What CPU is in the Jornada?
Cheers, -rob
Jornada is 100mhz or so .. it skipped and jumped a lot until I twiddled the buffersize and thread priorities until it worked smoothly.
PS, mad works pretty well on the jornada and ipaq. It takes about
15%
cpu on the ipaq to play a stereo mp3 with opt_speed on and no asm,
and
about 55% on the jornada (well not great but it's a crap cpu).
What CPU is in the Jornada?
Cheers, -rob