Hi,
I'm trying to make a simple sound player for my application and am having trouble getting the URL of files using CFBundleCopyResourceURL.
My app (so far) consists of a delegate and a view controller plus my own custom class for a sound object (just a NSObject that will play sounds). My view controller instantiates the sound object.
If try to load sounds in the sound object with CFBundleCopyResourceURL (to get the sound file URL) it returns NULL. If I move the code (to get the sound file URLs) to my view controller, it works.
The only way I can get the sound object to load the sounds is to have the view controller get the URL with CFBundleCopyResourceURL and then pass the resource URL to the sound object, which is messy as I'd rather have the sound object take care of all of it's loading needs.
Is there a scope/access issue with CFBundleCopyResourceURL? It's driving me mental!
Thanks,
Neil
I'm trying to make a simple sound player for my application and am having trouble getting the URL of files using CFBundleCopyResourceURL.
My app (so far) consists of a delegate and a view controller plus my own custom class for a sound object (just a NSObject that will play sounds). My view controller instantiates the sound object.
If try to load sounds in the sound object with CFBundleCopyResourceURL (to get the sound file URL) it returns NULL. If I move the code (to get the sound file URLs) to my view controller, it works.
The only way I can get the sound object to load the sounds is to have the view controller get the URL with CFBundleCopyResourceURL and then pass the resource URL to the sound object, which is messy as I'd rather have the sound object take care of all of it's loading needs.
Is there a scope/access issue with CFBundleCopyResourceURL? It's driving me mental!
Thanks,
Neil