_SndOpenRaw bug? SOLVED!
#2
I think you're issue is that you don't pass the _SndRaw handle to
_SndRawLen()
. The regular _SndRawLen with no parameter does not include sound for other opened raw handles, so it always returns zero and you'll write all the data to _SndRaw with no delay. Using
_SndRawLen(RAWSND)
returns the correct time remaining for the handle.

Note also that your
Do until _SndRawLen < 0.1: Loop
is a busy loop - it will continue to use up CPU time while waiting and effectively use as much CPU as the OS will let it. Adding a small _Delay such as
_Delay .01
inside that loop drastically reduces CPU usage for me, and it still plays smoothly because there's no real risk of the sound buffer running empty when you're aiming to keep it at .1 seconds full.
Reply


Messages In This Thread
_SndOpenRaw bug? SOLVED! - by Petr - 03-03-2023, 06:30 PM
RE: _SndOpenRaw bug? - by DSMan195276 - 03-03-2023, 09:41 PM
RE: _SndOpenRaw bug? - by Petr - 03-03-2023, 10:04 PM



Users browsing this thread: 1 Guest(s)