mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Added rate master and divisor. Moved OSS compatibility stuff out of asound.h. Added best rate helpers
This commit is contained in:
parent
74832704a8
commit
8a50d1ed8f
2 changed files with 4 additions and 1 deletions
|
|
@ -372,7 +372,7 @@ int snd_pcm_dump_setup(snd_pcm_t *handle, FILE *fp)
|
|||
fprintf(fp, "mode: %s\n", assoc(setup->mode, modes));
|
||||
fprintf(fp, "format: %s\n", assoc(setup->format.format, fmts));
|
||||
fprintf(fp, "channels: %d\n", setup->format.channels);
|
||||
fprintf(fp, "rate: %d\n", setup->format.rate);
|
||||
fprintf(fp, "rate: %d (%d/%d=%g)\n", setup->format.rate, setup->rate_master, setup->rate_divisor, (double) setup->rate_master / setup->rate_divisor);
|
||||
// digital
|
||||
fprintf(fp, "start_mode: %s\n", assoc(setup->start_mode, starts));
|
||||
fprintf(fp, "xrun_mode: %s\n", assoc(setup->xrun_mode, xruns));
|
||||
|
|
|
|||
|
|
@ -254,6 +254,9 @@ static int snd_pcm_plug_setup(void *private, snd_pcm_setup_t *setup)
|
|||
setup->format = plug->first->src_format;
|
||||
else
|
||||
setup->format = plug->last->dst_format;
|
||||
/* FIXME: this is not exact */
|
||||
setup->rate_master = setup->format.rate;
|
||||
setup->rate_divisor = 1;
|
||||
err = snd_pcm_plug_alloc(plug, setup->frag_size);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue