Hi,
After using my program in one session generating a stream a number of times, the later times it starts stuttering and seems to get worse the more I generate the audio. Every time I generate this audio I am running a Reset() function first
public void Reset()
{
Bass.BASS_ChannelStop(_BASSStream);
_BASSStream = Bass.BASS_StreamCreatePush(44100, 1, BASSFlag.BASS_SAMPLE_FLOAT, IntPtr.Zero);
Bass.BASS_ChannelSetSync(_BASSStream, BASSSync.BASS_SYNC_END, 0, MySyncProc, IntPtr.Zero);
...Other initialising stuff for my own synth software
}
What is the best way to reset Bass.net for every session of generating and playing a sound?
I should add that my synth is being called every 1/10th of a second to create a buffer of sound [8820] float samples (1/5th seconds worth audio) then Bass.BASS_StreamPutData() is called. It starts playing after the first call to Bass.BASS_StreamPutData()
. The last batch of audio is called with Bass.BASS_StreamPutData(...otherdata, buffer.Length * 4) | (int)BASSStreamProc.BASS_STREAMPROC_END)
.After measuring the GetCPU, it gently increases through time while playing but doesnt hit or go above 0.1. Buffer is 500, UpdatePeriod is 100.
So the first like 6 plays are fine, then stutter gets added to every subsequent play(GetCPU is giving same results even when it stutters) until I restart the program.
Thanks.