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:
parent
349c15dfe4
commit
7d12bdc8bc
|
@ -103,9 +103,6 @@ class Audio_out::Out
|
||||||
|
|
||||||
if (full_right)
|
if (full_right)
|
||||||
channel_right->alloc_submit();
|
channel_right->alloc_submit();
|
||||||
|
|
||||||
channel_left->progress_submit();
|
|
||||||
channel_right->progress_submit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _play_silence()
|
void _play_silence()
|
||||||
|
@ -137,17 +134,24 @@ class Audio_out::Out
|
||||||
/* send to driver */
|
/* send to driver */
|
||||||
if (int err = Audio::play(data, sizeof(data)))
|
if (int err = Audio::play(data, sizeof(data)))
|
||||||
PWRN("Error %d during playback", err);
|
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 {
|
} else {
|
||||||
_play_silence();
|
_play_silence();
|
||||||
}
|
}
|
||||||
|
|
||||||
p_left->invalidate();
|
|
||||||
p_right->invalidate();
|
|
||||||
|
|
||||||
p_left->mark_as_played();
|
/* always report when a period has passed */
|
||||||
p_right->mark_as_played();
|
Session_component *channel_left = channel_acquired[LEFT];
|
||||||
|
Session_component *channel_right = channel_acquired[RIGHT];
|
||||||
_advance_position(p_left, p_right);
|
channel_left->progress_submit();
|
||||||
|
channel_right->progress_submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user