mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
- fixed the calculation of snd_pcm_avail() with plugin.
this will fix the slow playback problem on mplayer. - the delay calculation is optimized a bit.
This commit is contained in:
parent
a2101162a8
commit
8bcadcb2a6
1 changed files with 4 additions and 2 deletions
|
|
@ -622,8 +622,10 @@ int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
|||
}
|
||||
status->appl_ptr = *pcm->appl.ptr;
|
||||
status->hw_ptr = *pcm->hw.ptr;
|
||||
status->avail = pcm->buffer_size;
|
||||
snd_pcm_plugin_delay(pcm, &status->delay);
|
||||
if (plugin->client_frames) {
|
||||
status->delay = plugin->client_frames(pcm, status->delay);
|
||||
status->avail = plugin->client_frames(pcm, status->avail);
|
||||
}
|
||||
if (!snd_atomic_read_ok(&ratom)) {
|
||||
snd_atomic_read_wait(&ratom);
|
||||
goto _again;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue