aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c4
-rw-r--r--audio/audio_template.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/audio/audio.c b/audio/audio.c
index e095b1a..3e60c12 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1068,7 +1068,7 @@ static int audio_pcm_hw_find_min_out (HWVoiceOut *hw, int *nb_livep)
int nb_live = 0;
for (sw = hw->sw_head.lh_first; sw; sw = sw->entries.le_next) {
- if (sw->active || !sw->empty) {
+ if (sw->active && !sw->empty) {
m = audio_MIN (m, sw->total_hw_samples_mixed);
nb_live += 1;
}
@@ -1540,7 +1540,7 @@ static void audio_run_out (AudioState *s)
cleanup_required = 0;
for (sw = hw->sw_head.lh_first; sw; sw = sw->entries.le_next) {
- if (!sw->active && sw->empty) {
+ if (!sw->active || sw->empty) {
continue;
}
diff --git a/audio/audio_template.h b/audio/audio_template.h
index d3764c8..c0d07e5 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -496,6 +496,9 @@ SW *glue (AUD_open_, TYPE) (
sw->vol = nominal_volume;
sw->callback.fn = callback_fn;
sw->callback.opaque = callback_opaque;
+#ifdef DAC
+ sw->empty = 1;
+#endif
#ifdef DAC
if (live) {