0
0

When one big song ends, there is a big delay and stall while next big song is loading. What is the best way to eliminate this? I cannot preload all songs in memory because of they are too large.

  • You must to post comments
0
0

Why not just capture and fire an ‘event’ just before the end of the track ( a pre-defined time or number of samples ) and then kick it off a bit early.

I used two dynamic channels, ‘live’ and ‘fade’ when the live track is say 2 seconds from the end i switch the pointer as follows

fade = live
live = new channel

as these ‘variables’ contain just the pointer to the channel switching them does not cause any problems

then fade out the fade channel and fade in the live channel over 2 seconds using calulated step from the tickcount eg

Vol = (MaxVolume / FadeTimeinMilliseconds) * (CurrentTickCount – StartofFadeTickCount)

if the elapsed time is greater then the fade time i insert a VOL+MAX ( or replay-gain max )or whatever just to make sure the volume to sweeeeet

not only does the transition sound smooth as a babies backside you can extend this to a crossfade :) function for the 50 million dj’s out there

thats what i do anyway, and i think its cute

  • You must to post comments
0
0

..oh BYW…i stream my tracks not load to memory….i can’t think of a way of loading a 100 ‘dj nasty techno’ mix into memory and not expect some ~~~issues~~~~

  • You must to post comments
0
0

[b:8lnn5paw]JimBob[/b:8lnn5paw]

Thanks, but are these disk file streams take small amount of processor time? May be they causing permanent disk swap?

  • You must to post comments
0
0

Stream them using FSOUND_Stream_Open and, for mp3s, try not specifying FSOUND_MPEGACCURATE. If the gap is still too large then you’ll have to start the second one before the first one’s finished like JimBob suggested.

Oh, and streams don’t take a huge amount of processor time or cause a lot of disk swapping – they’re very efficient.

  • You must to post comments
0
0

andrew

Thanks.
However, documentation says that streams are time consumer against samples. Another point is that they have separate interface. It would be good if your can set Stream property of sample. Or use parent class to encapsulate common methods. Otherwise, for different sounds you should use different interface.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.