Commit 8472cad7 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

aqsnd.c: set category before activating application audio session.

This will fix an old bug in Linphone where music stopped when Linphone was launched the first time
parent 3cc2db89
...@@ -796,15 +796,14 @@ static void aq_start_w(MSFilter * f) ...@@ -796,15 +796,14 @@ static void aq_start_w(MSFilter * f)
if (d->write_started == FALSE) { if (d->write_started == FALSE) {
OSStatus aqresult; OSStatus aqresult;
aqresult = AudioSessionSetActive(true);
UInt32 audioCategory; UInt32 audioCategory;
audioCategory= kAudioSessionCategory_AmbientSound; audioCategory= kAudioSessionCategory_AmbientSound;
ms_message("AQ: Configuring audio session for playback"); ms_message("AQ: Configuring audio session for playback");
aqresult =AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory); aqresult =AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory);
check_aqresult(aqresult,"Configuring audio session "); check_aqresult(aqresult,"Configuring audio session ");
aqresult = AudioSessionSetActive(true);
#endif #endif
d->writeAudioFormat.mSampleRate = d->rate; d->writeAudioFormat.mSampleRate = d->rate;
d->writeAudioFormat.mFormatID = kAudioFormatLinearPCM; d->writeAudioFormat.mFormatID = kAudioFormatLinearPCM;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment