mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Added snd_pcm_type_name()
Fixed rate conversion plugin (SIGSEGV) - rounding problem
This commit is contained in:
parent
c8fab38b67
commit
157107491c
5 changed files with 54 additions and 2 deletions
|
|
@ -351,6 +351,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
|
|||
snd_pcm_t *slave = plugin->slave;
|
||||
snd_pcm_uframes_t xfer = 0;
|
||||
snd_pcm_sframes_t result;
|
||||
int err;
|
||||
|
||||
while (size > 0) {
|
||||
snd_pcm_uframes_t frames = size;
|
||||
|
|
@ -358,8 +359,8 @@ static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
|
|||
snd_pcm_uframes_t slave_offset;
|
||||
snd_pcm_uframes_t slave_frames = ULONG_MAX;
|
||||
|
||||
snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames);
|
||||
if (slave_frames == 0)
|
||||
err = snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames);
|
||||
if (err < 0 || slave_frames == 0)
|
||||
break;
|
||||
frames = plugin->write(pcm, areas, offset, frames,
|
||||
slave_areas, slave_offset, &slave_frames);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue