Home > nsosstatuserrordomain code > osstatus error 43 avaudioplayer

Osstatus Error 43 Avaudioplayer

Contents

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 nsosstatuserrordomain error codes the company Business Learn more about hiring developers or posting ads with us Stack

Nsosstatuserrordomain Avaudioplayer

Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of nsosstatuserrordomain 2003334207 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to handle error code -43 from NSOSStatusErrorDomain when initializing AVAudioPlayer Object? up vote 20 down vote nsosstatuserrordomain code favorite 4 I observed strange behavior while working with AVAudioPlayer Following is the code: AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@",fileName]] error: &error]; In this, I downloaded the file from server and stored in application's Cache directory. I am getting following error: Error in playing = Domain = NSOSStatusErrorDomain Code = -43 Description = Error Domain=NSOSStatusErrorDomain Code=-43 "The operation couldn’t be completed. (OSStatus error -43.)" I also verified that file

Nsosstatuserrordomain Codes

is present at that location. Everytime I restart my application, I was getting same error for song play. After some time, when I tried to run same code, my player just works fine without any error. Can anyone tell me how to handle this error? Also, Can anyone explain me what was the problem? avaudioplayer share|improve this question edited Aug 22 '11 at 20:06 Bart Kiers 107k23187217 asked Sep 1 '10 at 13:50 Tanu 1431111 I got something very similar - except that I was able to get a local audio file to play but not a remote file using a URL. Did you ever figure out the meaning and correct response to OSStatus -43? –bradheintz Sep 30 '10 at 15:18 The file is not stored at local path of application's cache directory. And I am using that path only. not a remote path. –Tanu Oct 4 '10 at 6:13 I am not getting any information on "OSStatus -43". It only states that "The operation couldn’t be completed." –Tanu Oct 4 '10 at 6:13 I am getting the same error, and after verification I discovered that safari for iOS have also the problem with this mp3 file –someone0 Aug 22 '11 at 14:49 add a c

here for a quick overview of the site Help Center Detailed answers to any questions you nsosstatuserrordomain 1718449215 might have Meta Discuss the workings and policies of this site error domain=nsosstatuserrordomain code=-10875 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or

Error Domain=nsosstatuserrordomain Code=2003334207 "(null)"

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 http://stackoverflow.com/questions/3618744/how-to-handle-error-code-43-from-nsosstatuserrordomain-when-initializing-avaudi 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AVAudioPlayer -> not working up vote 0 down vote favorite Audio Player works fine if I initiate it for 20 to 30 times but after that it shows the following error Error Domain=NSOSStatusErrorDomain Code=-43 "The operation http://stackoverflow.com/questions/5335431/avaudioplayer-not-working couldn’t be completed. (OSStatus error -43.)" The code currently I am using is as follows - (void)playShortSound:(NSString *)fileName type:(NSString *)type { if (!isSound) { return; } NSString *soundFilePath =[[NSBundle mainBundle] pathForResource: fileName ofType: type]; NSURL *fileURL = [[[NSURL alloc] initFileURLWithPath: soundFilePath] autorelease]; NSError *error; AVAudioPlayer *newPlayer =[[AVAudioPlayer alloc] initWithContentsOfURL: fileURL error: &error]; //newPlayer.numberOfLoops = 0; newPlayer.volume=1.0; if (newPlayer == nil){ NSLog(@"%@",[error description]); //[self playShortSound:fileName type:type]; //return; } else{ [newPlayer play]; newPlayer.delegate=self; } } - (void) audioPlayerDidFinishPlaying: (AVAudioPlayer *) player successfully: (BOOL) completed { if (completed == YES) { NSLog(@"Sound Playing complete"); }else { NSLog(@"error in completion of %@",player.url); } } iphone bug-tracking avaudioplayer share|improve this question asked Mar 17 '11 at 5:57 Zahur 91310 add a comment| 4 Answers 4 active oldest votes up vote 1 down vote I was having the same problem and instead of init the player from url i did it from NSData. NSString *soundFilePath =[[NSBundle mainBundle] pathForResource: fileName ofType: type]; NSData *soundData = [[NSData alloc] initWithCo

click one of these buttons! Sign In Register Categories What's New? Activity Best Of... AVAudioPlayer not initializing - Works with AVPlayer, but http://iphonedevsdk.com/forum/iphone-sdk-development/52769-avaudioplayer-not-initializing-works-with-avplayer-but-not-avaudioplayer.html not AVAudioPlayer ?? Gudus Posts: 537Registered Users July 2010 edited November 2011 in iOS SDK Development I'm trying to switch my app from using MPMusicPlayerController/MediaPlayer framework to AVAudioPlayer/AVFoundation. The following https://www.parse.com/questions/i-am-saving-data-into-parse-as-an-audio-file-but-get-errors-when-i-try-to-play-it code works fine if I try to play the iPod audio using AVPlayer: NSArray *items = [[MPMediaQuery songsQuery] items]; NSURL *anUrl = [[items objectAtIndex: 0] valueForProperty:MPMediaItemPropertyAssetURL]; AVPlayer *plr; plr nsosstatuserrordomain code = [[[AVPlayer alloc] initWithURL:anUrl] retain]; [plr play]; The preceding code works great and plays the song. However, if I try to u se an AVAudioPlayer, instead of an AVPlayer, it does not work. This is how I'm trying to use AVAudioPlayer: NSArray *items = [[MPMediaQuery songsQuery] items]; NSURL *anUrl = [[items objectAtIndex: 0] valueForProperty:MPMediaItemPropertyAssetURL]; NSError *error; AVAudioPlayer *newPlayer = [[[AVAudioPlayer osstatus error 43 alloc] initWithContentsOfURL: anUrl error: &error] retain]; if (newPlayer) { [newPlayer prepareToPlay]; [newPlayer play]; } else { NSLog([error description]); } This logs the following error, instead of initializing and playing the AVAudioPlayer song: Error Domain=NSOSStatusErrorDomain Code=-43 "The operation couldn’t be completed. (OSStatus error -43.)" I need to use AVAudioPlayer to so that I can control the volume of each AVAudioPlayer, a feature that I can't find in AVPlayer. Any insight will be MUCH appreciated. Post edited by Gudus on November 2011My DJ is the BEST way to listen to music!
My DJ on iTunes | My DJ on Facebook

on Stack Overflow. Help Google Group Stack Overflow I am saving data into parse as an audio file but get errors when I try to play it 0 votes 4 answers 2.73k views over 2 years ago Rahul Agarwal Hi All, This is what my code looks like to read an audio file saved into parse.com using my ios iphone app. I get an error saying "This operation couldn't be completed". Any help would be appreciated. I am able to read the url to the file but when I alloc an AVAudioPlayer I get the error NSError *error; PFFile *audioFile = [Word objectForKey:@"audio"]; NSURL *audioFileUrl = [NSURL fileURLWithPath: audioFile.url]; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: audioFileUrl error:&error]; if (error) NSLog(@"Error: %@", [error localizedDescription]); else [audioPlayer play]; 4 Answers Rahul Agarwal Hi Héctor, Problem resolved. Posting for everyone's benefit. The issue is that AVAudioPlayer wont stream data. Need to load it into an NSData object first NSData *audioData = [NSData dataWithContentsOfURL: audioFileUrl]; audioPlayer = [[AVAudioPlayer alloc] initWithData: audioData error:&error]; Rahul Agarwal figured out the issue and posting for everyones benefit. Apparently AVAudioPlayer cant stream from a url so the fix is to load into NSData and use initWithData with audioPlayer. NSData *songFile = [[NSData alloc] initWithContentsOfURL:audioFileUrl options:NSDataReadingMappedIfSafe error:&error ]; audioPlayer = [[AVAudioPlayer alloc] initWithData: songFile error:&error]; Héctor Ramos Parser I believe fileURLWithPath: expects a path to the file relative to the local iOS filesystem. Try using urlWithString: instead. Rahul Agarwal Hi Héctor, thanks for your help. After that change still cant play the audio file. The error says "The operation couldn't be completed. (OSStatus error -43.) Is there any more detail to this error? - Héctor Ramos over 3 years ago Quicklinks Parse Server Open Source Download Blog Help Docs Status Policies Need Help? Documentation Get Support Developer Community Stay Connected Get the Parse Newsletter Be the first to know about new features, new platforms

 

Related content

avaudioplayer error code

Avaudioplayer Error Code table id toc tbody tr td div id toctitle Contents div ul li a href Avaudioplayer Sample Code a li li a href Nsosstatuserrordomain Code a li li a href Nsosstatuserrordomain Code a li li a href Error Domain nsosstatuserrordomain Code null a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site p h id Avaudioplayer Sample Code p About Us Learn more about Stack Overflow the company Business Learn more

avaudioplayer error 43

Avaudioplayer Error table id toc tbody tr td div id toctitle Contents div ul li a href Osstatus Error a li li a href Nsosstatuserrordomain Error Codes a li li a href Nsosstatuserrordomain a li ul td tr tbody table p here for a quick overview of the site Help relatedl Center Detailed answers to any questions you might osstatus error djay have Meta Discuss the workings and policies of this site About p h id Osstatus Error p Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting p h id Nsosstatuserrordomain Error

error error domain=nsosstatuserrordomain code=-43

Error Error Domain nsosstatuserrordomain Code - table id toc tbody tr td div id toctitle Contents div ul li a href Nsosstatuserrordomain a li li a href Nsosstatuserrordomain a li li a href Nsosstatuserrordomain Code a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl of this site About Us Learn more about Stack Overflow the nsosstatuserrordomain error codes company Business Learn more about hiring developers or posting ads with us Stack Overflow p h id Nsosstatuserrordomain

osstatus error domain code=-43

Osstatus Error Domain Code - table id toc tbody tr td div id toctitle Contents div ul li a href Nsosstatuserrordomain Avaudioplayer a li li a href Nsosstatuserrordomain a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might relatedl have Meta Discuss the workings and policies of this site nsosstatuserrordomain error codes About Us Learn more about Stack Overflow the company Business Learn more about nsosstatuserrordomain code hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x