Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Error -1500 using AudioServicesCreateSystemSoundID ?
I've got a weird simulator error related to sounds. My app loads a series of sounds (12 of them) in AIFF 4:1 44.1kHz mono format, as exported by QuickTime Pro.
On the device, everything works fine and I get no errors related to sound.
However in the simulator, two of the sounds spit an error upon load:
2008-11-22 18:50:27.422 My App[9606:20b] Error -1500 loading sound at path: /Users/higgins/Library/Application Support/iPhone Simulator/User/Applications/537A8435-3AAE-4189-ABA7-0A7C7C0316AB/My App.app/applause_long.aif 2008-11-22 18:50:27.423 My App[9606:20b] Error -1500 loading sound at path: /Users/higgins/Library/Application Support/iPhone Simulator/User/Applications/537A8435-3AAE-4189-ABA7-0A7C7C0316AB/My App.app/laughter_final.aif
Now...it still seems to WORK (doesn't crash), but the error seems odd to me. I tried recompressing the files and otherwise fiddling around, but the simulator just doesn't seem to like them.
From some Googling, I gather that -1500 is an "unspecified" error. That ain't too helpful. The only difference about these sounds (versus the other 10) is that they're bigger files. The other 10 files are 64k or under (real tiny); these two are 116k and 252k (5 sec and 11 sec respectively)...still pretty tiny, right? Is it possible that this is related?
No progress on this issue. The app still seems to run fine on all my test devices (all flavors of iPhones and iPod touches) but the simulator still complains.
No progress on this issue. The app still seems to run fine on all my test devices (all flavors of iPhones and iPod touches) but the simulator still complains.
Anyone with answers to this? Sound plays on the device but not on the simulator. I tried both wav and aif. Small 6sec files <100k <br /> AudioServicesCreateSystemSoundID(baseURL, &pmph); returns an error, I am using iPod 2.2.1 and Mac OS X 10.5.5. Thanks
Anyone with answers to this? Sound plays on the device but not on the simulator. I tried both wav and aif. Small 6sec files <100k <br /> AudioServicesCreateSystemSoundID(baseURL, &pmph); returns an error, I am using iPod 2.2.1 and Mac OS X 10.5.5. Thanks
UPDATE: After using Audacity to shorten the file in increments of 1sec, I found out only files <=4.9sec long will play in the simulator. File size is irrelevant (one file was 800K+) and Stereo at 44100. So anyone with ideas, or should I report this as a buig?<br /> I even used Apples 'caf' format.
UPDATE: After using Audacity to shorten the file in increments of 1sec, I found out only files <=4.9sec long will play in the simulator. File size is irrelevant (one file was 800K+) and Stereo at 44100. So anyone with ideas, or should I report this as a buig?<br /> I even used Apples 'caf' format.
Interesting. Yeah, I have just been living with this issue (bug?) for a while now -- it definitely only affects the simulator, and does feel like an Apple bug to me. I have several apps in the store using these kinds of sound files, and they definitely work on customers' devices, make it through the approval process, etc.
Yea! We've seen this 4.9sec bug too, only ... I didn't realize until just now that the device would play a full 30. Still, .WAV files are humongously overfat files and if you've got something long to play ... AVFoundation looks to be the solution.
I have a question, assuming one is just figuring all this out now (!) ... how does one free the resources allocated by a SystemSoundID played file properly?
I've got a weird simulator error related to sounds. My app loads a series of sounds (12 of them) in AIFF 4:1 44.1kHz mono format, as exported by QuickTime Pro.
On the device, everything works fine and I get no errors related to sound.
However in the simulator, two of the sounds spit an error upon load:
2008-11-22 18:50:27.422 My App[9606:20b] Error -1500 loading sound at path: /Users/higgins/Library/Application Support/iPhone Simulator/User/Applications/537A8435-3AAE-4189-ABA7-0A7C7C0316AB/My App.app/applause_long.aif 2008-11-22 18:50:27.423 My App[9606:20b] Error -1500 loading sound at path: /Users/higgins/Library/Application Support/iPhone Simulator/User/Applications/537A8435-3AAE-4189-ABA7-0A7C7C0316AB/My App.app/laughter_final.aif
Now...it still seems to WORK (doesn't crash), but the error seems odd to me. I tried recompressing the files and otherwise fiddling around, but the simulator just doesn't seem to like them.
From some Googling, I gather that -1500 is an "unspecified" error. That ain't too helpful. The only difference about these sounds (versus the other 10) is that they're bigger files. The other 10 files are 64k or under (real tiny); these two are 116k and 252k (5 sec and 11 sec respectively)...still pretty tiny, right? Is it possible that this is related?
I believed I've tracked down the cause of the -1500 error. I had a simple test app for sounds; which worked fine but when testing another sound, the mysterious -1500 error appeared. I was using a simple WAV file I grabbed from the net that was less than 1 second in duration. I discovered than when looking at 'More Info' on the file, the duration and frequency couldn't be determined; even though the file played perfectly in Audacity or iTunes. I loaded the file in Audacity and resaved it in the same format. The duration and frequency was now available and the -1500 error disappeared.
So I suspect the real issue was a matter of formatting within the sound file (perhaps Windows vs Mac formatting)? Although I'm sure someone out there could shed more light on the actual issue, this resolved the problem for me. Hope this helps!
I believed I've tracked down the cause of the -1500 error. I had a simple test app for sounds; which worked fine but when testing another sound, the mysterious -1500 error appeared. I was using a simple WAV file I grabbed from the net that was less than 1 second in duration. I discovered than when looking at 'More Info' on the file, the duration and frequency couldn't be determined; even though the file played perfectly in Audacity or iTunes. I loaded the file in Audacity and resaved it in the same format. The duration and frequency was now available and the -1500 error disappeared.
So I suspect the real issue was a matter of formatting within the sound file (perhaps Windows vs Mac formatting)? Although I'm sure someone out there could shed more light on the actual issue, this resolved the problem for me. Hope this helps!
I agree. I resaved and it worked.
Also, FYI. mp3 formats play in simulator but not on device. For anyone wondering, stick with caf.
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAudioServicesCreateSystemSoundID(baseURL, &pmph);
returns an error, I am using iPod 2.2.1 and Mac OS X 10.5.5.
Thanks
Here is the code.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeUPDATE: After using Audacity to shorten the file in increments of 1sec, I found out only files <=4.9sec long will play in the simulator. File size is irrelevant (one file was 800K+) and Stereo at 44100. So anyone with ideas, or should I report this as a buig?<br />
I even used Apples 'caf' format.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI'd say go ahead and radar it.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI have a question, assuming one is just figuring all this out now (!) ... how does one free the resources allocated by a SystemSoundID played file properly?
CODE:
- (void)playSound:(NSString *)thisSound {
NSLog(@"GVC:playSound: %@", thisSound);
if (thisSound != nil) {
SystemSoundID soundID;
NSString *thisSoundsPath = [[NSBundle mainBundle] pathForResource:thisSound ofType:@"wav"];
OSStatus err = AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:thisSoundsPath], &soundID);
if (err) {
NSLog(@"*** WARNING *** Error occurred assigning sound!");
}
AudioServicesAddSystemSoundCompletion(soundID, NULL, NULL, SoundFinished, thisSoundsPath);
AudioServicesPlaySystemSound(soundID);
CFRunLoopRun();
}
}
When played, the sound calls this simple routine Constants.h:
static void SoundFinished (SystemSoundID soundID, void *sound2dispose)
{
/* finished playing, freeing resources */
AudioServicesDisposeSystemSoundID(sound2dispose);
CFRelease(sound2dispose);
CFRunLoopStop(CFRunLoopGetCurrent());
NSLog(@"cleaning ... %@", sound2dispose);
}
BUT i'm crashing more now than ever. Obviously over-releasing or releasing too soon, i don't know.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeSo I suspect the real issue was a matter of formatting within the sound file (perhaps Windows vs Mac formatting)? Although I'm sure someone out there could shed more light on the actual issue, this resolved the problem for me. Hope this helps!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAlso, FYI. mp3 formats play in simulator but not on device. For anyone wondering, stick with caf.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome