dde_bsd: change packet processing

Instead of looping the whole queue, the driver now loops on the first
invalid packet. In any case it will send a progress signal to its
client.

Fixes #1666.
This commit is contained in:
Josef Söntgen 2015-09-01 13:49:00 +02:00 committed by Christian Helmuth
parent 349c15dfe4
commit 7d12bdc8bc
1 changed files with 13 additions and 9 deletions

View File

@ -103,9 +103,6 @@ class Audio_out::Out
if (full_right)
channel_right->alloc_submit();
channel_left->progress_submit();
channel_right->progress_submit();
}
void _play_silence()
@ -137,17 +134,24 @@ class Audio_out::Out
/* send to driver */
if (int err = Audio::play(data, sizeof(data)))
PWRN("Error %d during playback", err);
p_left->invalidate();
p_right->invalidate();
p_left->mark_as_played();
p_right->mark_as_played();
_advance_position(p_left, p_right);
} else {
_play_silence();
}
p_left->invalidate();
p_right->invalidate();
p_left->mark_as_played();
p_right->mark_as_played();
_advance_position(p_left, p_right);
/* always report when a period has passed */
Session_component *channel_left = channel_acquired[LEFT];
Session_component *channel_right = channel_acquired[RIGHT];
channel_left->progress_submit();
channel_right->progress_submit();
}
/*