mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Replaced snd_pcm_avail() with snd_pcm_hwsync()
This commit is contained in:
parent
dac0626b9f
commit
8205a95376
14 changed files with 48 additions and 67 deletions
|
|
@ -188,17 +188,10 @@ snd_pcm_state_t snd_pcm_plugin_state(snd_pcm_t *pcm)
|
|||
return snd_pcm_state(plugin->slave);
|
||||
}
|
||||
|
||||
int snd_pcm_plugin_avail(snd_pcm_t *pcm, snd_pcm_uframes_t *availp)
|
||||
int snd_pcm_plugin_hwsync(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_plugin_t *plugin = pcm->private_data;
|
||||
snd_pcm_uframes_t sd;
|
||||
int err = snd_pcm_avail(plugin->slave, &sd);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (plugin->client_frames)
|
||||
sd = plugin->client_frames(pcm, sd);
|
||||
*availp = sd;
|
||||
return 0;
|
||||
return snd_pcm_hwsync(plugin->slave);
|
||||
}
|
||||
|
||||
int snd_pcm_plugin_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
||||
|
|
@ -640,7 +633,7 @@ int snd_pcm_plugin_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops = {
|
||||
status: snd_pcm_plugin_status,
|
||||
state: snd_pcm_plugin_state,
|
||||
avail: snd_pcm_plugin_avail,
|
||||
hwsync: snd_pcm_plugin_hwsync,
|
||||
delay: snd_pcm_plugin_delay,
|
||||
prepare: snd_pcm_plugin_prepare,
|
||||
reset: snd_pcm_plugin_reset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue