mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
implemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed can_rewind and can_forward
This commit is contained in:
parent
058dde8b7d
commit
c88672d86f
17 changed files with 212 additions and 55 deletions
|
|
@ -649,6 +649,11 @@ static int snd_pcm_dmix_pause(snd_pcm_t *pcm ATTRIBUTE_UNUSED, int enable ATTRIB
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_dmix_rewindable(snd_pcm_t *pcm)
|
||||
{
|
||||
return snd_pcm_mmap_hw_avail(pcm);
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_dmix_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||
{
|
||||
snd_pcm_direct_t *dmix = pcm->private_data;
|
||||
|
|
@ -723,6 +728,11 @@ static snd_pcm_sframes_t snd_pcm_dmix_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t f
|
|||
return result + frames;
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_dmix_forwardable(snd_pcm_t *pcm)
|
||||
{
|
||||
return snd_pcm_mmap_avail(pcm);
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_dmix_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||
{
|
||||
snd_pcm_sframes_t avail;
|
||||
|
|
@ -885,7 +895,9 @@ static snd_pcm_fast_ops_t snd_pcm_dmix_fast_ops = {
|
|||
.drop = snd_pcm_dmix_drop,
|
||||
.drain = snd_pcm_dmix_drain,
|
||||
.pause = snd_pcm_dmix_pause,
|
||||
.rewindable = snd_pcm_dmix_rewindable,
|
||||
.rewind = snd_pcm_dmix_rewind,
|
||||
.forwardable = snd_pcm_dmix_forwardable,
|
||||
.forward = snd_pcm_dmix_forward,
|
||||
.resume = snd_pcm_direct_resume,
|
||||
.link = NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue