Okay…found some time to test the MBS Audio plugin…
And with a little tweaking I get the sweep sine wave with the Port Audio example app.
The Callback looks like this now to generate the sweep:
Var n,c,i As Integer
Var f As Single
Var increment As Single = frequency / 7639.437
PlayWindow.FrequencyLabel.Text = Str(frequency) + " Hz"
c=FrameCount-1
for i=0 to c
sinIndex = sinIndex + increment
if sinIndex>2*3.1415926 then sinIndex=sinIndex-2*3.1415926
f = sin(sinIndex) / 2
outputBuffer.SingleValue(n)=f // left
n=n+4
outputBuffer.SingleValue(n)=f // right
n=n+4
next
If frequency <= 20000 then frequency = frequency + 20
Tried to stop the audio with a simple PlayWindow.Close as there is this Close event:
dim e as integer
if s<>nil then
e=s.Stop
e=s.Close
end if
But of course the app just hangs…
What is the correct way to stop the audio?