But I may have been missing something, since the results are mixed. The second sound starts at the wrong position...
May be this is not the correct way to do it?
The "v_zeroventiita.aiff" sound file is a recording of voice growing numbers, from 0 to 20. One for each second of the recording.
This is the script I am using:
Code: Select all
on MouseUp
put gPrefTF["AllPath"]["Sounds"] & "Voices/v_zeroventiita.aiff" into tSoundPath
mobileControlCreate "player", "playerControl"
put the result into playerID
mobileControlSet playerID, "useApplicationAudioSession", "true"
mobileControlSet playerID, "filename", tSoundPath
mobileControlSet playerID, "visible", false
put 2000 into tStartTime
put 3000 into tEndTime
mobileControlSet playerID, "startTime", tStartTime
mobileControlSet playerID, "endTime", tEndTime
mobileControlDo playerID, "play"
wait 2 seconds with messages
mobileControlDo playerID, "stop"
--now play another part of the file
put 5000 into tStartTime
put 6000 into tEndTime
mobileControlSet playerID, "startTime", tStartTime
mobileControlSet playerID, "endTime", tEndTime
mobileControlDo playerID, "play"
wait 2 seconds with messages
mobileControlDelete playerID
end Mouseup
Thanks