Skip to content

Commit 632cf66

Browse files
committed
Added flushBuffer() to the AudioSource interface
1 parent e26428f commit 632cf66

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

AudioCoder/src/main/java/org/operatorfoundation/audiocoder/WSPRAudioSource.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ interface WSPRAudioSource
9494
*/
9595
suspend fun cleanup()
9696

97+
/**
98+
* Discards all buffered audio samples.
99+
* Call immediately before starting a decode collection window to ensure
100+
* only time-aligned audio is fed to the decoder.
101+
* Default implementation is a no-op for sources that don't buffer.
102+
*/
103+
suspend fun flushBuffer() {}
104+
97105
/**
98106
* Gets current status and diagnostic information about the audio source.
99107
*

0 commit comments

Comments
 (0)