Hey, I have two questions about streaming using BASS.
I noticed that when one writes to the buffer in your callback, it takes a while for the actual data written to become audible. In the frequency example that comes with BASS, for instance, it takes almost one full second when moving the slider around before you hear the change you made.
This is true also when one sets the bufferlength to a lower number (I set it to 0.01).
In addition, BASS also seems to poll the callback every 100ms. Is there anyway to change how fast it polls, and thus how much data it requests (for 50ms poll it would require half the data) ?
I ask this because I'm writing the audio section for a game emulator, and the emulator will write out approximately 44.1 bytes a millisecond (since it is a 44100 khz wave) over time, and the delay for when the data is written and actually hearing the data written should rather small.
My second question is your opinion on the best way to buffer this data. Since the emulator can sometimes write 40 bytes in one millisecond, and maybe 50 in the next, I know I need to buffer the written values first before sending to BASS, but I haven't come up good scheme for doing so.
What I was thinking was setting up BASS so that it would write around 1000 bytes or so whenever it polls, and my emu would be always a couple hundred bytes ahead of that.
Thanks guys, and if you have any suggestions, I would greatly appreciate them.
-Jordan