output/alsa: multiply writei() result with out_frame_size
.. and not in_frame_size, because this relates to the frame size being sent to ALSA. pcm_export_source_size() will then turn it back into the in_frame_size scale.
This commit is contained in:
parent
ec93114347
commit
89377556cd
@ -787,8 +787,10 @@ alsa_play(struct audio_output *ao, const void *chunk, size_t size,
|
|||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
ad->period_position = (ad->period_position + ret)
|
ad->period_position = (ad->period_position + ret)
|
||||||
% ad->period_frames;
|
% ad->period_frames;
|
||||||
|
|
||||||
|
size_t bytes_written = ret * ad->out_frame_size;
|
||||||
return pcm_export_source_size(&ad->export,
|
return pcm_export_source_size(&ad->export,
|
||||||
ret * ad->in_frame_size);
|
bytes_written);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0 && ret != -EAGAIN && ret != -EINTR &&
|
if (ret < 0 && ret != -EAGAIN && ret != -EINTR &&
|
||||||
|
Loading…
Reference in New Issue
Block a user