Play WAV audio clips in iOS

Tore Nilsen tore.nilsen at me.com
Sat Jan 6 17:15:46 EST 2018


When you import an audio file into the stack as a control you need to use:  play audioClip "the name of your imported sound”, as the imported file becomes an audio clip. The dictionary is somewhat confusing when it comes to support for audio clips om mobile platforms. If you look at audioClip as object, the dictionary states that it is not supported on mobile platforms, but the messages deleteAudioClip and newAudioClip seems to be supported, as is the keyword templateAudioClip.

In my opinion it is always best to use external files for audio and video, and store them in a designated folder where you have write permissions. This makes it easier to update these resources without the need to update the whole application.

Regards 
Tore Nilsen

> 6. jan. 2018 kl. 20:34 skrev Roger Guay via use-livecode <use-livecode at lists.runrev.com>:
> 
> I really appreciate your patience with me, Randy, but, here is my question: 
> 
> Under the File menu of LiveCode, one is offered the option of "Importing As Control” -> “Audio File…” What’s Up with that and how is that related to your solution?
> 
> Thanks,
> Roger
> 
> 
> 
>> On Jan 6, 2018, at 11:12 AM, Randy Hengst via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> The wav file is imported via the Copy File tab…the wav file is not a control.
>> 
>> The path is then listed in the copy files window… for example:
>> /Users/randyhengst/Desktop/iOS App SOUNDS and ICON folders/FingerGloveCounting ICONS/0.wav
>> 
>> In this case, the name of my wav file is “0.wav”
>> 
>> So in a control you call the play command… for example:
>> play specialFolderPath("engine") &"/"& “0.wav"
>> 
>> I’ve used buttons, graphic objects, and images as the control.
>> 
>> If you change the location of the wav file or the location of the .livecode file you’re working after importing via the Copy Files tab, you’ll need to change the path or the wav file won’t be found when building your standalone.
>> 
>> In case you’re interested, here is a link to one of my free iOS apps that plays wav files via buttons:
>> https://itunes.apple.com/us/app/number-id/id642054717?mt=8
>> 
>> randy
>> 
>>> On Jan 6, 2018, at 12:45 PM, Roger Guay via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> 
>>> Thanks Randy. I missed that! Is this done instead of Importing (them) As Controls, or in addition to Importing As Controls? Or is Importing As Controls useless?
>>> 
>>> Thanks again,
>>> 
>>> Roger
>>> 
>>>> On Jan 6, 2018, at 10:18 AM, Randy Hengst via use-livecode <use-livecode at lists.runrev.com> wrote:
>>>> 
>>>> I bring the wav files into the app using the Copy Files tab in the Standalone Applications Settings.
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list