3

I found a function to play sounds using toolbox, creds going to whomever created it:

-(SystemSoundID) createSoundID: (NSString*)name {
    NSString *path = [NSString stringWithFormat: @"%@/%@",
             [[NSBundle mainBundle] resourcePath], name];

    NSURL* filePath = [NSURL fileURLWithPath: path isDirectory: NO];
    SystemSoundID soundID;
    AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID);
    NSLog(@"%@, %@", path, filePath);
    return soundID;
}

However once I want the sound the play and I use the function

mySound = [self createSoundID: @"canopen.wav"];

AudioServicesPlaySystemSound(mySound);

It only plays in the simulator and not once I move it over to the iPad. Please help

Wayne Hartman
  • 18,369
  • 7
  • 84
  • 116
Benjamin
  • 85
  • 5

1 Answers1

1

The same thing happened to me a while ago. Check whether your iPad is muted :)

Philipp Schlösser
  • 5,179
  • 2
  • 38
  • 52