Commit graph

4 commits

Author SHA1 Message Date
Ilya Konstantinov
8ca40fa86f osxaudiosrc: iOS resampling causes stuttering
Fixes stuttering audio when iOS AU is resampling. To make AU resample,
one has to request a rate that differs from AVAudioSession's
sampleRate. The resampling itself is not the culprit, but rather our
API misuse.

AudioUnitRender modifies the mDataByteSize members with the
actual read bytes count. Therefore, they must be reinitialized
before each AudioUnitRender. (The buffers themselves can be
preallocated.)

The "stutter" was caused by one AudioUnitRender making the buffer
too small for other AudioUnitRender invocations, making them fail
with -50 (paramErr). By way of luck, when AU didn't resample, all
AudioUnitRender invocations read the same number of bytes.

(This patch addresses some non-interleaved audio concerns, but
at this moment the elements do not support non-interleaved audio
and non-interleaved is untested.)

https://bugzilla.gnome.org/show_bug.cgi?id=744922
2015-02-24 16:21:11 +05:30
Sebastian Dröge
d8a4435fd8 osxaudio: OSStatus is not a fourcc, so don't print it as one... 2014-09-17 13:55:18 +03:00
ted-n
b217b6fdfb osxaudio: port to v.1.0 2013-04-17 09:52:13 +02:00
Andoni Morales Alastruey
9621074006 osxaudio: add a façade for the CoreAudio API 2013-03-08 12:13:55 +01:00