Removed memcpy use

This commit is contained in:
Abramo Bagnara 2000-06-11 13:31:46 +00:00
parent e8cac7de4d
commit c956c5a024
3 changed files with 12 additions and 12 deletions

View file

@ -165,12 +165,12 @@ int snd_pcm_stream_setup(snd_pcm_t *pcm, snd_pcm_stream_setup_t *setup)
str = &pcm->stream[setup->stream];
assert(str->open);
if (str->valid_setup) {
memcpy(setup, &str->setup, sizeof(*setup));
*setup = str->setup;
return 0;
}
if ((err = pcm->ops->stream_setup(pcm, setup)) < 0)
if ((err = pcm->ops->stream_setup(pcm, &str->setup)) < 0)
return err;
memcpy(&str->setup, setup, sizeof(*setup));
*setup = str->setup;
str->bits_per_sample = snd_pcm_format_physical_width(setup->format.format);
str->bits_per_frame = str->bits_per_sample * setup->format.channels;
str->valid_setup = 1;