mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-14 18:25:22 +00:00
osxaudiosrc: Fix render callback removal when pausing/stopping
At least on iOS, the 'input' callback kept being called after going to PAUSED. Specifying the right type (like in gst_core_audio_io_proc_start()) fixes that. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7856>
This commit is contained in:
parent
49489d35ae
commit
212290baf0
1 changed files with 5 additions and 1 deletions
|
@ -31,14 +31,18 @@ gst_core_audio_remove_render_callback (GstCoreAudio * core_audio)
|
|||
{
|
||||
AURenderCallbackStruct input;
|
||||
OSStatus status;
|
||||
AudioUnitPropertyID callback_type;
|
||||
|
||||
/* Deactivate the render callback by calling SetRenderCallback
|
||||
* with a NULL inputProc.
|
||||
*/
|
||||
input.inputProc = NULL;
|
||||
input.inputProcRefCon = NULL;
|
||||
callback_type = core_audio->is_src ?
|
||||
kAudioOutputUnitProperty_SetInputCallback :
|
||||
kAudioUnitProperty_SetRenderCallback;
|
||||
|
||||
status = AudioUnitSetProperty (core_audio->audiounit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, /* N/A for global */
|
||||
status = AudioUnitSetProperty (core_audio->audiounit, callback_type, kAudioUnitScope_Global, 0, /* N/A for global */
|
||||
&input, sizeof (input));
|
||||
|
||||
if (status) {
|
||||
|
|
Loading…
Reference in a new issue