Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all.
I am having FOUR .wav files, all i converted to .caf using the

Code:
afconvert -f caff -d LEI16 {input} {output}

The above command is working fine, but in my IPhone app, just two of them are working where TWO are not. But in Quicktime all the .caf files are working.

below is my code which i used to play the .caf files

I noticed that those TWO which are not working in iPhoen are more than 5secs long where the working TWOs are 1sec long only.

Code:
CFBundleRef mainBundle = CFBundleGetMainBundle();
	CFURLRef soundFileURLRef  =  CFBundleCopyResourceURL(mainBundle,(CFStringRef)tagString,(CFStringRef)type,NULL);
	
	SystemSoundID sysSoundID;
	AudioServicesCreateSystemSoundID(soundFileURLRef, &sysSoundID);
	AudioServicesPlaySystemSound(sysSoundID);


Any help is much appreciated !



Similar issue for one .m4a file which i converted to .caf
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.