From: Jonathan C. R. <jon...@ba...> - 2004-04-20 10:26:47
|
Hi, I think you're overlooking something here... What if the track exceeds physical memory in size? (I don't know whether you've tried playing a long movement of a symphony or an audio book with the patched mp3example, but believe me, it won't work ;-) ). It's not like I'm trying to re-implement the functionality of the memory manager anyway - I'm just trying to use it. My problem was encountered when invoking free(). ( In the worst case, there is actually something physically wrong with my iPod ;). ) The way I see it, we can copy Apple's caching mechanism - have 'up to 4 songs cached' (i.e. around 16M), and even improve on it. The improvement would be in caching the first couple of frames of a larger number of songs - say, the next 12 songs, and the last 12. The improvement here is that, in my experience, one tends to skip tracks very frequently when playing large playlists. When you skip forward two or three tracks you get a cache miss, and the unit hangs while the disk spins up. By caching 'heads' of the songs, we'll have a much more responsive play queue. Cheers, Jonathan. On Tue, 2004-04-20 at 23:36, Matthew J. Sahagian wrote: > Forgive me if I'm mistaken about what you're trying to do, > but would it not be possible simply to get the songs > chosen for play, and attempt to allocate memory per song, > and just retain a list of where these songs are in memory > and then point to those for playing? It seems sort of > strange that you're trying to re-implement something > that's technically built into the memory manager. > If there is no contiguous block large enough to hold > the mp3 then you could attempt to split, and store > half in one part half in another, and continue to split > until it does fit... just an idea. |