1

I am unable to play sound using AudioToolbox Framework. My line of code :

SystemSoundID soundID;
    CFURLRef  soundFileURLRef;
    OSStatus error = AudioServicesCreateSystemSoundID((__bridge CFURLRef)(aFileURL),         &aSoundID);

After debug Show error ((OSStatus) error = -1500).

Dilip Manek
  • 9,095
  • 5
  • 44
  • 56
Undertaker
  • 39
  • 1
  • 7

1 Answers1

1

The error code -1500 represents the constant kAudioServicesSystemSoundUnspecifiedError, which has the description "An unspecified error has occurred.".

I'd double check that the URL can be read by your program, that the destination is a supported format, and that it is a valid, readable file.

Of course, googling kAudioServicesSystemSoundUnspecifiedError will give you some additional hints.

justin
  • 104,054
  • 14
  • 179
  • 226
  • @iphoneProfile those error codes and their documentation is scattered about -- you're welcome :) – justin Mar 05 '13 at 08:14