Is there a way to have a music file be completely loaded in to memory for starting playback? I know there is advanced settings for buffer slice settings but I have no idea what the values actually change. Could not find any content in the help either.
Bryan
loading songs in to memory for playback
Re: loading songs in to memory for playback
Can you tell us what you actually want. What is the problem you are trying to solve? And why do you think that loading a file into memory would help?
And exactly what to you mean by loading a file into memory?
And exactly what to you mean by loading a file into memory?
Re: loading songs in to memory for playback
I was using an evaluation of Pure Vinyl which has a feature that loads each song in to memory before starting playback so it does not read from disk while playing, does not have I/O conflicts etc. I thought PV sounded better this way and I'd like to try it with Play. Its not an issue I'm trying to address, its a possible audio playback performance tweak.
Re: loading songs in to memory for playback
This isn't something that you can really accomplish in the current version without a ton of source hacking.
In the future this may be possible, though.
In the future this may be possible, though.
Re: loading songs in to memory for playback
What are the advanced settings for then? I'm curious.sbooth wrote:This isn't something that you can really accomplish in the current version without a ton of source hacking.
In the future this may be possible, though.
Bryan
Re: loading songs in to memory for playback
The advanced settings affect how much of a song is buffered into memory. However, the typical buffer sizes are on the size of msec. Attempting to set them to a size that would contain an entire track's worth of audio would probably cause some issues.
A much better approach would be to mmap() the file in the decoder and just have reads from the decoder copy from memory to memory. This would preserve some of the architecture and be very fast (this is the hacking I was referring to).
A much better approach would be to mmap() the file in the decoder and just have reads from the decoder copy from memory to memory. This would preserve some of the architecture and be very fast (this is the hacking I was referring to).
Re: loading songs in to memory for playback
You would need an mlock() as well, otherwise it would work basically just like a read, but with a more convenient API.
But I still don't know what the difference is supposed to be. How would "I/O conflicts" affect the sound? If you get audio dropouts (buffer underruns) t is of course a problem, but I saw no indication of that from the OP. As long as the data is available when it is needed, it shouldn't make any difference how and when it got there.
Or is it the noise from the disk drive that is the problem?
But I still don't know what the difference is supposed to be. How would "I/O conflicts" affect the sound? If you get audio dropouts (buffer underruns) t is of course a problem, but I saw no indication of that from the OP. As long as the data is available when it is needed, it shouldn't make any difference how and when it got there.
Or is it the noise from the disk drive that is the problem?