fix flush

This commit is contained in:
2026-05-07 22:49:52 +03:00
parent 6067aae3dc
commit 28859d3e16
3 changed files with 34 additions and 0 deletions
+13
View File
@@ -142,6 +142,7 @@ type
procedure WriteDouble(Left, Right: Double);
// Convenience: массив Single
procedure Write(const Left, Right: array of Single; Count: Integer);
procedure Clear;
property IsOpen: Boolean read FOpen;
property LastError: string read GetLastError;
@@ -542,6 +543,18 @@ begin
FOpen := False;
end;
procedure TAudioOutput.Clear;
begin
FMutex.Enter;
try
FInPt := 0;
FOutPt := 0;
FillChar(FBuf, SizeOf(FBuf), 0);
finally
FMutex.Leave;
end;
end;
// ---------------------------------------------------------------------------
// WriteDouble — точная копия audio_write() из оригинала
// ---------------------------------------------------------------------------