Avaudioplayer Error 43
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might osstatus error 43 djay have Meta Discuss the workings and policies of this site About
Osstatus Error 29759
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Nsosstatuserrordomain Error Codes
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
Nsosstatuserrordomain 2003334207
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 favorite 4 I observed strange behavior while working with AVAudioPlayer Following is the code: AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: [NSURL nsosstatuserrordomain code 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 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 106k23187216 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 an
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 nsosstatuserrordomain codes site About Us Learn more about Stack Overflow the company Business Learn more nsosstatuserrordomain 1718449215 about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x error domain=nsosstatuserrordomain code=1954115647 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 AVAudioPlayer Error http://stackoverflow.com/questions/3618744/how-to-handle-error-code-43-from-nsosstatuserrordomain-when-initializing-avaudi Domain=NSOSStatusErrorDomain Code=-43 up vote 1 down vote favorite 1 I get the error above when trying to play a song file (chosen via MPMediaPickerController). Works fine in iOS6, but on iOS5 I get the error. Here's the code: DLog(@"song: %@", self.customSongUrl); //always logs a valid url such as ipod-library://item/item.mp3?id=-1890948386979134309 if (self.customSongUrl) { AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayback error:nil]; double delayInSeconds = 1.0; http://stackoverflow.com/questions/17554927/avaudioplayer-error-domain-nsosstatuserrordomain-code-43 dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ NSError *error = nil; self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:self.customSongUrl error:&error]; if (!self.audioPlayer) { NSLog(@"AVAudioPlayer could not be established: %@", error); //results in Error Domain=NSOSStatusErrorDomain Code=-43 "The operation couldn’t be completed. (OSStatus error -43.)" } [self.audioPlayer prepareToPlay]; [self.audioPlayer setNumberOfLoops:-1]; [self.audioPlayer play]; }); } From the research I've done, error -43 indicates that the file doesn't exist. But the file was chosen from the iTunes library with MPMediaPickerController. And again, this error only happens on iOS5. So why would iOS5 think the song doesn't exist? For reference, this is how I'm getting the song url from the media picker: - (void)mediaPicker:(MPMediaPickerController *) mediaPicker didPickMediaItems:(MPMediaItemCollection *) collection { MPMediaItem *item = [[collection items] objectAtIndex:0]; self.customSongUrl = [item valueForProperty:MPMediaItemPropertyAssetURL]; [self dismissViewControllerAnimated:YES completion:NULL]; } ios ios5 avaudioplayer mpmediapickercontroller share|improve this question asked Jul 9 '13 at 17:50 soleil 4,6731572136 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote I had a similar issue, the problem wound up being that my mp4 file target membership check box was unchecked, once I checked it, the file played perfectly. share|improve this answer answe
click one of these buttons! Sign In Register Categories What's New? Activity Best Of... AVAudioPlayer not initializing - Works with AVPlayer, but not AVAudioPlayer ?? Gudus Posts: 537Registered Users http://iphonedevsdk.com/forum/iphone-sdk-development/52769-avaudioplayer-not-initializing-works-with-avplayer-but-not-avaudioplayer.html 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 code works fine if I try to play the iPod http://www.ebay.com/itm/MAKE-PRINTHEAD-CLEANING-CARTRIDGES-HP-81-Designjet-5000-/360219440253 audio using AVPlayer: NSArray *items = [[MPMediaQuery songsQuery] items]; NSURL *anUrl = [[items objectAtIndex: 0] valueForProperty:MPMediaItemPropertyAssetURL]; AVPlayer *plr; plr = [[[AVPlayer alloc] initWithURL:anUrl] retain]; [plr play]; The preceding code works great and plays nsosstatuserrordomain code 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 alloc] initWithContentsOfURL: anUrl error: &error] retain]; if (newPlayer) { [newPlayer prepareToPlay]; [newPlayer play]; } else { NSLog([error description]); } This logs avaudioplayer error 43 the following error, instead of initializing and playing the AVAudioPlayer song: Error Domain=NSOSStatusErrorDomain Code=-43 "The operation couldnt 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
New app - See screenshots and details at www.globaclock.com.
I
searchesMessagesNotification Back to home page |Listed in category: Computers/Tablets & Networking > Printers, Scanners & Supplies > Printer & Scanner Parts & Accs > Cleaning & Repair Kits These alternative suggestions have been selected for you by eBay's recommendation engine.Sellers: Learn more about how to get the most benefit from cross-merchandising. People who viewed this item also viewed Feedback on our suggestions HP Designjet 5000 5100 5500 4000 83 p... $16.99 Free shipping Genuine HP 81 C4953A Yellow PRINTHEAD... $29.00 Free shipping Genuine HP 81 C4952A Magenta PRINTHEA... $29.00 Free shipping Genuine HP 81 C4955A Light Magenta PR... $29.00 Free shipping Genuine HP 81 C4950A Black PRINTHEAD ... $29.00 Free shipping Genuine HP 81 C4954A Light Cyan PRINT... $29.00 Free shipping Picture Information Image not available Photos not available for this variation Have one to sell? Sell now Details about MAKE PRINTHEAD CLEANING CARTRIDGES HP 81 Designjet 5000 500ml +FULL UNIQUE TOOLS = FOR ALL WIDE FORMAT PRINTERS MAKE PRINTHEAD CLEANING CARTRIDGES HP 81 Designjet 5000 Email to friends Share on Facebook - opens in a new window or tab Share on Twitter - opens in a new window or tab Share on Pinterest - opens in a new window or tab | Add to watch list Seller information magicbrand (17025 ) 98.4%Positive feedback Follow this seller Visit store: Dr.EpSUN Magic Ink... See other items More... See all magicbrand has no other items for sale. Item Information Item condition: New Quantity: More than 10 available / 56 sold Please enter a quantity of $qty_dummy$ or less Please enter a quantity of 1 Purchases are limited to $qty_dummy$ per buyer Please enter quantity of 1 or more Please enter a lower number Choose quantity that is less than $qty_dummy1$ or equal to $qty_dummy$ You can only choose quantity that is equal to $qty_dummy$ Price: US $39.99     Add to cart 31 watching Add to watch list Remove from watch list Watch list is full Add to collection Free shipping 56 sold 5 inquiries Shipping: FREE Standard Shipping from outside US | See details See details about international shipping here. help icon for Shipping - opens a layer Items shipping internationally may be subject to customs processing depending on the item's declared v