mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-14 10:15:48 +00:00
A correctly configured AVAudioSession is needed on iOS to: - allow the application to capture microphone audio (in some cases) - avoid playback being silenced in silent mode Without this, initializing AudioUnit for capture can fail on iOS >=17 (from my testing). Since AVAudioSession has a lot of settings, in most cases its setup should be handled by the user/app. However, just to have a basic default scenario covered, let's configure the bare minimum ourselves, and allow anyone to disable that behaviour by setting configure-session=false on src/sink. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7856>
31 lines
1 KiB
C
31 lines
1 KiB
C
/*
|
|
* Copyright (C) 2024 Piotr Brzeziński <piotr@centricular.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef _GST_IOS_AUDIO_SESSION_H
|
|
#define _GST_IOS_AUDIO_SESSION_H
|
|
|
|
#include <gst/gst.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
void gst_ios_audio_session_setup (gboolean is_src);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* _GST_IOS_AUDIO_SESSION_H */
|