diff options
author | Andy Nichols <andy.nichols@digia.com> | 2014-03-06 12:33:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 14:58:25 +0100 |
commit | 175bdda34701fb3ee9688b40a974a402975b910f (patch) | |
tree | 986991f58729fc43f8ce0585666666ae7633d5cb /src/plugins/coreaudio/coreaudiosessionmanager.mm | |
parent | b6b974361ab000be0585998dabfe8019ad6b39c1 (diff) |
CoreAudio: Set default audio category to Playback on iOS
This fixes the issue that when we use QSoundEffect we dont need to get
permission to use the microphone. This was because we were defaulting
to PlayAndRecord. Now we only switch to the PlayAndRecord category when
we try and use an input device.
[ChangeLog][QtMultimedia][iOS] Using QSoundEffect (or SoundEffect in
QML) no longer requires permission to use the microphone.
Change-Id: I94535215497a718005c280bfd84b428b4bf1b16a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/plugins/coreaudio/coreaudiosessionmanager.mm')
-rw-r--r-- | src/plugins/coreaudio/coreaudiosessionmanager.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/coreaudio/coreaudiosessionmanager.mm b/src/plugins/coreaudio/coreaudiosessionmanager.mm index 4b3bdb7dc..0e795e786 100644 --- a/src/plugins/coreaudio/coreaudiosessionmanager.mm +++ b/src/plugins/coreaudio/coreaudiosessionmanager.mm @@ -216,7 +216,8 @@ CoreAudioSessionManager::CoreAudioSessionManager() : { m_sessionObserver = [[CoreAudioSessionObserver alloc] initWithAudioSessionManager:this]; setActive(true); - setCategory(CoreAudioSessionManager::PlayAndRecord, CoreAudioSessionManager::MixWithOthers); + //set default category to just Playback and only switch if we need more permissions + setCategory(CoreAudioSessionManager::Playback, CoreAudioSessionManager::MixWithOthers); } CoreAudioSessionManager::~CoreAudioSessionManager() |