Thanks, Chris. I tried a number of variations of your suggestion to no avail!
I tried these code snippets:
put the engine folder & "/assets/mySnd.caf" into tSoundFile
or put specialFolderPath("engine") & "/mySnd.caf" into tSoundFile
mobilePlaySoundOnChannel tSoundFile, "current", "now"
I tried these for both wav and caf file formats, again all to no avail.
I copied sound files directly into the "non-stack files in the application" of
the Standalone Application Settings. I'm sure I'm doing something stupid
(again), but I can't figure it out. I would greatly appreciate any more help
you might provide.
BTW, you suggest verifying "that it's copying correctly in the app bundle". How
do I do that?
Thanks,
Roger
On Jun 20, 2012, at 10:00 AM, [email protected] wrote:
> Message: 9
> Date: Wed, 20 Jun 2012 08:38:58 -0600
> From: Chris Sheffield <[email protected]>
> To: How to use LiveCode <[email protected]>
> Subject: Re: Playing Sounds in iOS
> Message-ID: <[email protected]>
> Content-Type: text/plain; CHARSET=US-ASCII
>
> Roger,
>
> When using mobilePlaySoundOnChannel, I've always had to build the full path
> to the file for it to work correctly. So if you've verified that it's copying
> correctly into the app bundle and, assuming it's not in a sub folder of the
> bundle, try something like this:
>
> if the environment is "mobile" then
> put specialFolderPath("engine") & "/mySnd.wav" into tPath
> mobilePlaySoundOnChannel tPath, "current", "now"
> else
> play "mySnd.wav"
> end if
>
> Hopefully that'll work for you. If you have the sound file in a sub folder in
> the bundle, simply make sure to include that in the path.
>
> Chris Sheffield
>
>
> On Jun 20, 2012, at 7:46 AM, Roger Guay <[email protected]> wrote:
>
>> Hi all,
>>
>> I'm trying to play a sound in iOS.
>>
>> My code: if the environment is "mobile" then
>> mobilePlaySoundOnChannel "mySnd.wav", "current", "now"
>> else play "mySnd.wav"
>>
>> I've imported mySnd.wav to the stack and I've copied it to the "Non-stack
>> files in the application" of the Standalone Application Settings.
>>
>> it works in the IDE but not in the simulator nor my iPad.
>>
>> Any help please?
>>
>> Thanks!
>> Roger
>
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode