Error Initializing Audio Session
click one of these buttons! Sign In Register Categories What's New? Activity Best Of... AudioSessionInitialize failed! Why? Johanovski Posts: 343Registered Users @ @ January 2010 edited May 2011 in iOS SDK Development Hi there! I'm error initializing session for virtual machine exchange 2007 trying to get into audio sessions due to catch when game is interrupted (by error initializing session manager a call, for example) and this way getting sound work again after the interruption, but when I try to initialize the sound avaudiosession I get the following error: ...[3590:207] AudioSessionInitialize failed! 1768843636 However, sound is loaded successfully and there's no problem playing music or sounds (since an interruption happens, when sounds silence for the rest of app's life). Here is the code I'm trying to use when I initialize my sound manager: // This var will hold our Singleton class instance that will be handed to anyone who asks for it static SingletonSoundManager *sharedSoundManager = nil; // Class method which provides access to the sharedSoundManager var. + (SingletonSoundManager *)sharedSoundManager { // synchronized is used to lock the object and handle multiple threads accessing this method at // the same time @synchronized(self) { // If the sharedSoundManager var is nil then we need to allocate it. if(sharedSoundManager == nil) { // Allocate and initialize an instance of this class //NSLog(@SSM == nil); [[self alloc] init]; }else { //NSLog(@SSM != nil); } } // Return the sharedSoundManager return sharedSoundManager; } - (id)init { //NSLog(@INIT SOUND); if(self = [super init]) { //create audio session. OSStatus status = AudioSessionInitialize(NULL, NULL, interruptionListenerCallback, self); if (status != kAudioSessionNoError) { /**********THIS LINE GIVES THE TRACE!***********/ NSLog(@AudioSessionInitialize failed! %d, status); } soundSources = [[NSMutableArray alloc] init]; soundLibrary = [[NSMutableDictionary alloc] init]; sourceLibrary = [[NSMutableDictionary alloc] init]; musicLibrary = [[NSMutableDictionary alloc] init]; // Set the default volume for music backgroundMusicVolume = 1.0f; // Set up the OpenAL BOOL result = [self initOpenAL]; if(!result) return nil; return self; } //[self release]; return nil; } /* This method is used to initialize OpenAL. It gets the default device, creates a new context to be used and then preloads the define # sources. This preloading means we wil be able to play up to (max 32) different sounds at the same time */ - (BOOL) initOpenAL { // Get the device we are going to use for sound. Using NULL gets the default device device = alcOpenDevice(NULL); // If a device has been found we then need to create a
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up how to get audio session initialization error status since AudioSessionInitialize was http://iphonedevsdk.com/forum/iphone-sdk-development/39073-audiosessioninitialize-failed-why.html deprecated? up vote 0 down vote favorite On start app i called AudioSessionInitialize and check result value. If it was kAudioSessionInitializationError then i informed user that application can not work properly cause audio does not work. But since iOS 7 this function was deprecated. It was similar question before: A fix for AudioSessionInitialize Deprecated? but... it has no any mention about how to get initialization error status. And of http://stackoverflow.com/questions/20966565/how-to-get-audio-session-initialization-error-status-since-audiosessioninitializ course, i know how to initialize audio session without this function: Just calling [AVAudioSession sharedInstance] cause hidden call of AudioSessionInitialize. But it returns non zero value anyway. So new interface does not allow to get initialization error status. upd: I'm not sure it's important but i receive message to stdout (which i redirected to log file) while call with error happens: ERROR: [7971] 146: Unable to talk to server: error 0x10000003 (268435459) explaination why i need this: It happens very rarely (less then 0,1% of case) but it happens for any firmware. Last case registered for iOS 7.0.3 - so it's actual return value still (btw, first case registered for first firmware my app supported: iOS 2.2). It's important feature (cause i develop alarm clock) - it allows to know user about issues in the evening and not in the morning (cause in the morning this issue will cause oversleep). ios audio error-handling ios7 deprecated share|improve this question edited Jan 7 '14 at 12:36 asked Jan 7 '14 at 7:54 Speakus 1,57411648 Your shared answer already provided a solution: stackoverflow.com/a/19772893/188331 –Raptor Jan 7 '14 at 7:56 no - solution does not contain any mention about error status, and i wrote
Answers Feedback Issue Tracker Blog Evangelists User Groups Navigation Home Unity Industries Showcase Learn Community Forums Answers Feedback Issue Tracker Blog Evangelists User Groups Get Unity Asset Store Unity account You need a http://answers.unity3d.com/questions/28616/error-initializing-audiosessionerrno1768843636.html Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account Language Chinese Spanish Japanese Korean Portuguese Ask a question Spaces Default Help Room META Moderators Topics Questions Users Badges Home / 1 Question by shawnlehner · Sep 29, 2010 at 08:33 PM · iphoneplaymovie Error Initializing AudioSession(errNO:1768843636) I am getting the following error when returning from using the error initializing iPhoneUtils.PlayMovie() method. The background music that had been playing before beginning the movie does not resume. Error Initializing AudioSession(errNO:1768843636) Comment Add comment · Show 4 10 |3000 characters needed characters left characters exceeded ▼ Viewable by all users Viewable by moderators Viewable by moderators and the original poster Advanced visibility Viewable by all users shawnlehner · Oct 01, 2010 at 09:56 PM 1 Share MORE INFO: This issue is continuing error initializing session to occur whenever playing a movie and returning to the application. The music which is paused for the movie never resumes, but other menu related sounds work fine after the movie has ended. shawnlehner · Oct 18, 2010 at 05:56 PM 1 Share MORE INFO: There is more information about this issue here: http://forum.unity3d.com/threads/62370-Music-stops-playing-when-returning-from-video-(Unity-3.0-iPhone-Advanced) shawnlehner · Oct 20, 2010 at 06:41 PM 1 Share MORE INFO: I have noticed another strange bug when playing non-compressed audio as well. During normal game play there can be up to 4 non-compressed audio files playing plus 1 compressed background sound track which plays the duration of game play. I have noticed that on occasion Unity will skip playing one of the non-compressed sounds. The non-compressed sounds are played using the PlayOneShot method on an AudioEmitter, and it is usually the same clip played multiple times for a gun shot. It seems that sometimes it will play 4-5 straight with no issue, other times it will skip playing one chrstopherbrown · Nov 22, 2010 at 04:44 PM 1 Share I'm going to bump this as I am having a similar issue. I make use of iPhoneUtils.PlayMovie in Scene A, then AudioSource.Play in Scene B and get the dreaded error: force accelerometer registration -> applicat