Hi,
 
I have a question about mmap(), hope someone can clarify for me.
As I know, mmap() maps the whole file into memory, so OS can access the source file directly from memory.
However there should be a restriction to memory size on the embedded system.
 
In my test, I compile madplay with mmap supported, and then play a mp3 file of 43MB, and it plays well.
But my question is I only get 32MB SDRAM on my development board.
It seems that the memory size is not large enough to store all the data.
How does mmap() work?
 
Besides, I want to implement the fast forward/rewind function.
But it is a little slow to rewind, because it needs to search the location from the first frame, if mmap() isn't enabled.
(Maybe there are other better methods, but I don't know...)
If mmap() works, then it should be faster than without mmap(), shouldn't it?
 
Sorry for any unclear expression.
Thanks for help.
 
Regards,
Hank