play sound command?

Devin Asay devin_asay at byu.edu
Thu Sep 15 12:00:19 EDT 2016


> On Sep 15, 2016, at 3:02 AM, panagiotis merakos <panos.merakos at livecode.com> wrote:
> 
> Hi Bill,
> 
> Audio clips cannot be .mp3. The supported formats, according to the
> dictionary entry for "audioClip" are:
> 
> *Audio clips can be in WAV, AIFF, or AU format*
> 
> I agree with you that the player object has many more capabilities. The
> only advantage of audioClips is that you can store the sound *in the stack*:
> 
> *Unlike a player, an audio clip contains the sound that it plays. This
> increases the memory required by your stack, because the sound data is
> loaded into memory along with the rest of the stack whenever the stack file
> is open. However, it prevents the sound from being accidentally separated
> from the stack file and lost.*

I wonder if the dictionary is completely accurate in this regard. An audio clip does not HAVE to be imported into the stack to be played. This also works:

    play audioClip “/path/to/clip.wav”

The external file clearly functions as an audio clip, because the same format restrictions apply—this syntax only works with WAV, AIFF, and AU formats. So what is happening under the hood? When playing an external audio file, does LiveCode create a temporary audioClip object? I decided to make some updates to the dictionary entry, and I don’t want to tell any lies. :)

Devin


Devin Asay
Director
Office of Digital Humanities
Brigham Young University



More information about the use-livecode mailing list