I'm revisiting an app that I wrote several years ago
It uses the AudioStreamer object.
I generate a continuous waveform (sine wave) of unknown duration (it could be 5 seconds or many hours) and output this using StartPlaying and Write.
I don't use the record function at all.
I cannot write the entire buffer at once so I plan to Write single bytes at a time and check return value for false to find when the PlayBuffer is full, wait a little bit then write bytes until the buffer is full again, repeat.
Is this a good strategy for keeping the buffer full of data?
The second question occurs if the user requests to stop. If I call StopPlaying does this clear the PlayBuffer of any left over data so that if I call StartPlaying again later it will start with fresh data?
Thanks,
Barry.
It uses the AudioStreamer object.
I generate a continuous waveform (sine wave) of unknown duration (it could be 5 seconds or many hours) and output this using StartPlaying and Write.
I don't use the record function at all.
I cannot write the entire buffer at once so I plan to Write single bytes at a time and check return value for false to find when the PlayBuffer is full, wait a little bit then write bytes until the buffer is full again, repeat.
Is this a good strategy for keeping the buffer full of data?
The second question occurs if the user requests to stop. If I call StopPlaying does this clear the PlayBuffer of any left over data so that if I call StartPlaying again later it will start with fresh data?
Thanks,
Barry.