mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Try to fix period_time/period_size problems for direct plugin slaves
This commit is contained in:
parent
00fba04f01
commit
b7e8f57314
4 changed files with 16 additions and 3 deletions
|
|
@ -824,7 +824,7 @@ int _snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
|
|||
params.format = SND_PCM_FORMAT_S16;
|
||||
params.rate = 48000;
|
||||
params.channels = 2;
|
||||
params.period_time = 125000; /* 0.125 seconds */
|
||||
params.period_time = -1;
|
||||
params.buffer_time = -1;
|
||||
bsize = psize = -1;
|
||||
params.periods = 3;
|
||||
|
|
@ -840,6 +840,10 @@ int _snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* set a reasonable default */
|
||||
if (psize == -1 && params.period_time == -1)
|
||||
params.period_time = 125000; /* 0.125 seconds */
|
||||
|
||||
params.period_size = psize;
|
||||
params.buffer_size = bsize;
|
||||
err = snd_pcm_dsnoop_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue