mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
Fix buffer allocation and mmap with plugins
Fixed the bug producing silent tones with some combinations of plugins. The internal buffer handling is now better (cleaner) integrated with snd_pcm_generic_*().
This commit is contained in:
parent
e62ecc876a
commit
ffdb04c3ea
9 changed files with 48 additions and 78 deletions
|
|
@ -658,6 +658,12 @@ int snd_pcm_softvol_open(snd_pcm_t **pcmp, const char *name,
|
|||
pcm->private_data = svol;
|
||||
pcm->poll_fd = slave->poll_fd;
|
||||
pcm->poll_events = slave->poll_events;
|
||||
/*
|
||||
* Since the softvol converts on the place, and the format/channels
|
||||
* must be identical between source and destination, we don't need
|
||||
* an extra buffer.
|
||||
*/
|
||||
pcm->mmap_shadow = 1;
|
||||
snd_pcm_set_hw_ptr(pcm, &svol->plug.hw_ptr, -1, 0);
|
||||
snd_pcm_set_appl_ptr(pcm, &svol->plug.appl_ptr, -1, 0);
|
||||
*pcmp = pcm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue