tags:

views:

433

answers:

2

i have used following code to play caf sound.but it works in simulator ,not in device...anyone can give solution?

 NSString *pathe=[[NSBundle mainBundle] pathForResource:@"Watermovement3" ofType:@"caf"];
CFURLRef url =(CFURLRef)[NSURL fileURLWithPath:pathe];
AudioServicesCreateSystemSoundID(url,&okk);
AudioServicesPlaySystemSound(okk);
A: 

Check the capitalization of your filename: is it possible it's "watermovement3" or "WaterMovement3"?

David Maymudes
i have copied ,i am right
Mikhail Naimy
A: 

You need to check the codecs of the caf file. The simulator supports more codecs than the device!

Zebs