Hi all
i am developing an app for iOS devices. This app is suppossed to playback a number of aif sound files that may be part of the bundle. I have problems accessing the aif files and I really dont know if I am on the right track. So far i read the “bundle” and “resources” programming guides but there is of course no connection to Juce, so… maybe somebody of you has experience with this and can point the right direction ?
What i do is including the aif files as resource into the bundle.
Then, i use this code to access the files
audioURL = CFBundleCopyResourceURL( mainBundle,CFSTR(“test1”),CFSTR(“aif”),NULL );
CFStringRef fn = CFURLGetString(audioURL);
String fileName = PlatformUtilities::cfStringToJuceString(fn);
File audioFile1(fileName);
( the I set up a AudioFormatReader, and so on…)
Fine… the url points to the right file in the .app, the .app contains the desired aif file, there is no runtime error opening and accessing the file, but at playback time there is no sound ouput at all… (using IPhone Simulator)
When i access the same aif from somewhere on my Macs filesystem, everything fine.
Well, there is surely something that I do in the wrong way…maybe i missed something… i simply dont know where to start searching for the solution…
Regarding the resources programming guide i should be able to playback the files using
OSStatus error = AudioServicesCreateSystemSoundID (myURLRef, &mySSID);
AudioServicesAddSystemSoundCompletion (…)
AudioServicesPlaySystemSound (mySSID);
…but what i want is to playback the audio using Juce, not through some OSX or iOS system functions.
I also had a look on the Binarybuilder. The thing is that i dont want to be the aif files part of the code, but access them as files as they could easily become >100mb
Thanks for any help or comments.
regards
Rudi