Removed snd_pcm_hwptr().

Added snd_pcm_hwdiff() and snd_pcm_forward().
Returned the behaviour for snd_pcm_mmap_begin().
This commit is contained in:
Jaroslav Kysela 2003-02-22 17:19:02 +00:00
parent fbd99fdec0
commit 2dab1dfbc3
17 changed files with 327 additions and 246 deletions

View file

@ -325,12 +325,6 @@ static int snd_pcm_meter_hwsync(snd_pcm_t *pcm)
return snd_pcm_hwsync(meter->slave);
}
static int snd_pcm_meter_hwptr(snd_pcm_t *pcm, snd_pcm_uframes_t *hwptr)
{
snd_pcm_meter_t *meter = pcm->private_data;
return INTERNAL(snd_pcm_hwptr)(meter->slave, hwptr);
}
static int snd_pcm_meter_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
{
snd_pcm_meter_t *meter = pcm->private_data;
@ -402,6 +396,15 @@ static snd_pcm_sframes_t snd_pcm_meter_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
return err;
}
static snd_pcm_sframes_t snd_pcm_meter_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
{
snd_pcm_meter_t *meter = pcm->private_data;
snd_pcm_sframes_t err = snd_pcm_forward(meter->slave, frames);
if (err > 0 && pcm->stream == SND_PCM_STREAM_PLAYBACK)
meter->rptr = *pcm->appl.ptr;
return err;
}
static int snd_pcm_meter_resume(snd_pcm_t *pcm)
{
snd_pcm_meter_t *meter = pcm->private_data;
@ -614,6 +617,7 @@ static snd_pcm_fast_ops_t snd_pcm_meter_fast_ops = {
drain: snd_pcm_meter_drain,
pause: snd_pcm_meter_pause,
rewind: snd_pcm_meter_rewind,
forward: snd_pcm_meter_forward,
resume: snd_pcm_meter_resume,
writei: snd_pcm_mmap_writei,
writen: snd_pcm_mmap_writen,