Open seankovacs opened 11 years ago
One would activate audiosessions to play audio for MP3s and other sound files...I tried setting the session to No prior to making a call, though it didn't work.
Yeah, we're trying to track down where this happens and thought it was related to turn on our configuration.
Please get back to me if you find anything.
As an aside, maybe related, maybe totally not, but saw this on webrtc and noticed that justin uberti said there was an audio only problem in webrtc. Since we use libjingle + webrtc, it's really only a 50% change we're impacted, but still possible.
https://groups.google.com/forum/?fromgroups=#!topic/discuss-webrtc/g9HPfo6kC_U
On Tue, Apr 30, 2013 at 9:50 PM, Sean Kovacs notifications@github.comwrote:
If I don't activate an AudioSession (AudioSessionSetActive), the app works fine, but if I do, I get no input/ouput from the app (can't hear the other person, they can't hear me). I'm investigating...
— Reply to this email directly or view it on GitHubhttps://github.com/lukeweber/webrtc-jingle-client/issues/94 .
I'm back tracing the different methods and trying to narrow down where the hangup is - making some good progress. Only a matter of time. Keep you posted...
I added this bit of code to this method: AudioDeviceIPhone::InitPlayOrRecord()
OSStatus status;
AudioSessionInitialize(NULL, NULL, NULL, NULL);
UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord;
status = AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,
sizeof (sessionCategory),
&sessionCategory);
if (status != kAudioSessionNoError)
{
if (status == kAudioServicesUnsupportedPropertyError) {
printf("AudioSessionInitialize failed: unsupportedPropertyError");
}else if (status == kAudioServicesBadPropertySizeError) {
printf("AudioSessionInitialize failed: badPropertySizeError");
}else if (status == kAudioServicesBadSpecifierSizeError) {
printf("AudioSessionInitialize failed: badSpecifierSizeError");
}else if (status == kAudioServicesSystemSoundUnspecifiedError) {
printf("AudioSessionInitialize failed: systemSoundUnspecifiedError");
}else if (status == kAudioServicesSystemSoundClientTimedOutError) {
printf("AudioSessionInitialize failed: systemSoundClientTimedOutError");
}else {
printf("AudioSessionInitialize failed! %ld", status);
}
}
AudioSessionSetActive(TRUE);
If it's a bugfix that you find useful, just send me a pull request. I don't really have time to dev on iOS or push it forward, but want to support others having a stable system that works well for iOS.
As well, I noticed mic doesn't work on simulator, and that mic incorrectly reports that it's not available. I've filed these two bugs, and I'll push fixes to master soon once I've tested a bit more.
https://code.google.com/p/webrtc/issues/detail?id=2049 https://code.google.com/p/webrtc/issues/detail?id=2050
If I don't activate an AudioSession (AudioSessionSetActive), the app works fine, but if I do, I get no input/ouput from the app (can't hear the other person, they can't hear me). I'm investigating...