More on soundrecording and playback
carstenlist at itinfo.dk
Thu Aug 29 16:47:00 CDT 2002
Philip Usher wrote
> if you want to play an external aif sound file then:
> create a player object... i.e. "player 1"
> click on the player tab in the properites palette for player 1 and set the
> filepath of the player to the external sound file
> to play the sound from a script, use the command "start player 1"
No, an aif file would play perfectly well just with this:
play audioClip "path/filename"
no need to create a player.
And while your method (clicking and choosing in a players properties) is
great, it wouldnt work in our case ... we need to create the sound file with
new names and to play them ... and we actually do so without any problems in
Mac OS 9 using the two scripts shown under this text ... with the external
recordsound to do the actual recording. The playback is done just by the
scriptline <play audioClip "path/filename">
And according to the scripting guide (se record sound and play audio) the
same should be possible with the recording/playing technology build into
OUR OLD EXAMLPE (only Mac OS ... not windows and Mac OS X)
--glbstilfilsti contains the path to our rev application. glblydnavn
contains the actual name of the file ... and .aif is added by the script.
if platform() is "MacOS" then
put glbstilfilsti & "ress/sounds/opgavelyde/" & glbLydnavn & ".aif"
wait until the sound is done
answer "Optagelse af indtalt lyd kan kun ske under Mac OS" with OK
put (glbstilfilsti & ("ress/sounds/opgavelyde/") & glbLydnavn & (".aif"))
play audioClip tempLYD
More information about the use-livecode