mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Changed result of mmap_commit callback
(follows description of snd_pcm_mmap_commit function).
This commit is contained in:
parent
8ca451f0e1
commit
0917ba63b0
11 changed files with 57 additions and 53 deletions
|
|
@ -396,9 +396,9 @@ static int snd_pcm_meter_resume(snd_pcm_t *pcm)
|
|||
return snd_pcm_resume(meter->slave);
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_meter_mmap_commit(snd_pcm_t *pcm,
|
||||
snd_pcm_uframes_t offset,
|
||||
snd_pcm_uframes_t size)
|
||||
static int snd_pcm_meter_mmap_commit(snd_pcm_t *pcm,
|
||||
snd_pcm_uframes_t offset,
|
||||
snd_pcm_uframes_t size)
|
||||
{
|
||||
snd_pcm_meter_t *meter = pcm->private_data;
|
||||
snd_pcm_uframes_t old_rptr = *pcm->appl_ptr;
|
||||
|
|
@ -406,11 +406,10 @@ static snd_pcm_sframes_t snd_pcm_meter_mmap_commit(snd_pcm_t *pcm,
|
|||
if (result <= 0)
|
||||
return result;
|
||||
if (pcm->stream == SND_PCM_STREAM_PLAYBACK) {
|
||||
snd_pcm_meter_add_frames(pcm, snd_pcm_mmap_areas(pcm), old_rptr,
|
||||
(snd_pcm_uframes_t) result);
|
||||
snd_pcm_meter_add_frames(pcm, snd_pcm_mmap_areas(pcm), old_rptr, size);
|
||||
meter->rptr = *pcm->appl_ptr;
|
||||
}
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_meter_avail_update(snd_pcm_t *pcm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue