BufferingAudioSource can't play out of bounds


#1

I wanted to bring this up here before I delve into a possible work around/fix.

The BufferingAudioSource does not behave the same as the other positionable source, AudioFormatReaderSource. With the reader source if you set a negative read position or one above the length of source the stream will keep playing silence. The buffering source just stops if such a position is set.

This behaviour is handy because it allows you to roll off the beginning of an audio file such as when queuing a track in a real time DJ environment. At the moment I can’t do this using a read ahead and thus keeping the file reading off the audio thread.

It seems to be the fact that the BufferingAudioSource limits the read position to a validBufferStart position which can’t go below 0. Before I spend a long time delving through the class is this behaviour by design? And would it be desirable to change it to that suggested or should I build this into a wrapper class for it?

Cheers, Dave.


#2

Yes, it should be able to cope with that kind of situation… Wouldn’t require a lot of work to fix it, but haven’t time to look at it right now!


#3

Ok cheers, I’m working on something else right now but I’ll have a poke around if I get time before you do.