15.11.2011, 01:17 PM
der Einwand von Hans war natürlich völlig richtig, so läuft der Generator mit kaum wahrnehmbarer Grundlast:
Private Sub output()
Do While True
If (buffer.PlayPosition > 200000) And buf_m1 Then
buf_m1 = False
pinkNoise_gen()
buffer.Write(262143, pinkNoise, LockFlag.FromWriteCursor)
ElseIf (buffer.PlayPosition > 400000) And buf_m2 Then
buf_m2 = False
pinkNoise_gen()
buffer.Write(0, pinkNoise, LockFlag.FromWriteCursor)
ElseIf buffer.PlayPosition > 500000 Then
buffer.SetCurrentPosition(0)
buf_m1 = True
buf_m2 = True
Else
Thread.Sleep(10)
End If
Loop
End Sub
Private Sub output()
Do While True
If (buffer.PlayPosition > 200000) And buf_m1 Then
buf_m1 = False
pinkNoise_gen()
buffer.Write(262143, pinkNoise, LockFlag.FromWriteCursor)
ElseIf (buffer.PlayPosition > 400000) And buf_m2 Then
buf_m2 = False
pinkNoise_gen()
buffer.Write(0, pinkNoise, LockFlag.FromWriteCursor)
ElseIf buffer.PlayPosition > 500000 Then
buffer.SetCurrentPosition(0)
buf_m1 = True
buf_m2 = True
Else
Thread.Sleep(10)
End If
Loop
End Sub
Pffffffffft. "Da entwich das Vakuum" - Heinrich Physik, 1857.