Commit graph

8 commits

Author SHA1 Message Date
Arun Raghavan
691ecebe22 osxaudio: Don't set the format on an initialized AudioUnit
We need to initialize the AudioUnit early to be able to probe the
underlying device, but according to the AudioUnitInitialize() and
AudioUnitUninitialize() documentation, format changes should be done
while the AudioUnit is uninitialized. So we explicitly uninitialize the
AudioUnit during a format change and reinitialize it when we're done.
2015-07-14 17:49:50 +05:30
Ilya Konstantinov
0e5d698c6f osxaudio: Overhaul of probing caps
- Probing caps is unified between source and sink
- Hardware stream format is now reported as preferred capabilities
  (dynamically updated when hardware configuration changes)
- Get hardware channel layout from Remote IO just like from HAL
- More comprehensive mapping between AudioChannelLabel and
  GstAudioChannelPosition
- Support for unpositioned channel layouts
- Announce stereo-mono upmixing/downmixing in caps

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Tim-Philipp Müller
c4fa54da17 Fix double semicolons 2015-03-10 09:31:20 +00:00
Ilya Konstantinov
d450b1cac1 osxaudio: rename gst_core_audio_set_channels_layout()
to gst_core_audio_get_channel_layout().
2015-03-10 09:14:57 +05:30
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