fix flush mode

This commit is contained in:
philippe44
2023-12-27 19:46:16 -08:00
parent 5c90086bbd
commit 9679c5c104
19 changed files with 33 additions and 9 deletions

View File

@@ -443,7 +443,7 @@ void output_close_common(void) {
}
void output_flush(void) {
LOG_INFO("flush output buffer");
LOG_INFO("flush output buffer (full)");
buf_flush(outputbuf);
LOCK;
output.fade = FADE_INACTIVE;
@@ -457,3 +457,15 @@ void output_flush(void) {
output.frames_played = 0;
UNLOCK;
}
bool output_flush_streaming(void) {
LOG_INFO("flush output buffer (streaming)");
LOCK;
bool flushed = output.track_start != NULL;
if (output.track_start) {
outputbuf->writep = output.track_start;
output.track_start = NULL;
}
UNLOCK;
return flushed;
}