pcm_export: add _frame_size()

Move code from the ALSA output plugin.
This commit is contained in:
Max Kellermann
2012-04-23 21:36:50 +02:00
parent a0e4b6e266
commit df1c5ce314
3 changed files with 30 additions and 3 deletions

View File

@@ -674,9 +674,7 @@ alsa_open(struct audio_output *ao, struct audio_format *audio_format, GError **e
}
ad->in_frame_size = audio_format_frame_size(audio_format);
ad->out_frame_size = ad->export.pack24
? (size_t)(audio_format->channels * 3)
: ad->in_frame_size;
ad->out_frame_size = pcm_export_frame_size(&ad->export, audio_format);
return true;
}