Hi,
Thank you very much for comprehensive explanation. They help me so much.
I want to use at first time minimad like a model. As far as I understand you map whole input (mp3) file to the memory and work with pointer to this memory. But the functions defined in decoder.c like send_io, receive_io, receive_io_blocking, send, receive- used "int fd" like a handle to file.
My question is where you make relation between pointer to mapped mamory and handle to file?
Thank you.
Ivan
____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1
Ivan Mi ivan-mi@usa.net wrote:
I want to use at first time minimad like a model. As far as I understand you map whole input (mp3) file to the memory and work with pointer to this
memory.
But the functions defined in decoder.c like send_io, receive_io, receive_io_blocking, send, receive- used "int fd" like a handle to file.
My question is where you make relation between pointer to mapped mamory and handle to file?
Those functions are used internally in the async high-level API to communicate with the decoding coprocess. They are not used to read the mapped file.
The mapped memory is always referenced via struct mad_stream.
-- Robert Leslie rob@mars.org
hi all
I hope I don't cover too much ground that has already be covered many times in the past but I couldn't find and archives for this list.
First off I think libmad is awesome, a great bit of code. I have just finished integrating libmad into Kaffe, the open source java VM. Now any java app can call codec functions which will use the lowlevel libmad C libraries to do the hard work and pass back raw PCM. This was done as part of the pocketlinux.com project so we now have lightning fast mp3 decoding on iPaq and other handhelds.
I found the code so easy to use I was wondering why there aren't more players out there based on mad. Is there even an XMMS plugin? I will write one if there isn't. Seems like most of the players out there simply cut and paste code from mpg123 of simply fork it of as another process. I really like the idea of having a simple lib on the system for doing mp3 decoding and having all the players link against it.
Anyone, well done, thanks for some great code.
samo
Hi Sam,
First off I think libmad is awesome, a great bit of code. I have just finished integrating libmad into Kaffe, the open source java VM. Now any java app can call codec functions which will use the lowlevel libmad C libraries to do the hard work and pass back raw PCM. This was done as part of the pocketlinux.com project so we now have lightning fast mp3 decoding on iPaq and other handhelds.
Excellent. Is this available online somewhere? I took a quick look at pocketlinux.com but didn't know where to find it.
I found the code so easy to use I was wondering why there aren't more players out there based on mad. Is there even an XMMS plugin? I will write one if there isn't. Seems like most of the players out there simply cut and paste code from mpg123 of simply fork it of as another process. I really like the idea of having a simple lib on the system for doing mp3 decoding and having all the players link against it.
I think somebody was going to write an XMMS plug-in but I don't know whether any progress was made. If anyone has, surely they will speak up. :-)
It would be nice to develop a versatile API and shared library suitable for multiple applications. The current library is OK although perhaps a bit plain. In particular I think it would be helpful to have more API layers, so another layer might handle all the buffering associated with reading from a stream, and another layer could scale the output to any of a variety of formats (8/16/24/32-bit PCM, floating point, etc.) and so on.
This list is a good place to talk about such things.
Cheers, -rob
On Sat, Jan 27, 2001 at 01:08:05PM -0500, Rob Leslie wrote:
Hi Sam,
Excellent. Is this available online somewhere? I took a quick look at pocketlinux.com but didn't know where to find it.
It's in the current CVS version of Kaffe. Pocketlinux.com has details on getting this. libmad is used in part of Kaffe's JNI code in src/libraries/clib/media.
It would be nice to develop a versatile API and shared library suitable for multiple applications. The current library is OK although perhaps a bit plain. In particular I think it would be helpful to have more API layers, so another layer might handle all the buffering associated with reading from a stream, and another layer could scale the output to any of a variety of formats (8/16/24/32-bit PCM, floating point, etc.) and so on.
Certainly, all those extra API layers would be great. But for such things as XMMS, I'm sure it has all sorts of internal buffer handling and conversion utilities. The current low-level API works great for decoding...and thats the hard part :)
cheers,
Sam