Author Topic: Stuttering introduced through time.  (Read 175 times)

KevC

  • Posts: 22
Stuttering introduced through time.
« on: 6 Jul '24 - 23:29 »
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
Code: [Select]
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
Code: [Select]
Bass.BASS_StreamPutData().  The last batch of audio is called with 
Code: [Select]
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.
« Last Edit: 6 Jul '24 - 23:49 by KevC »

KevC

  • Posts: 22
Re: Stuttering introduced through time.
« Reply #1 on: 8 Jul '24 - 10:09 »
Apologies folks, it turns out that my synth is passing stuttery sound to Bass.