alice-teacher Stop Audio

Don Slater dslater at andrew.cmu.edu
Tue Aug 6 17:06:47 EDT 2013


The issue is that Alice "hands off" the playing of sound files to the Media manager of the computer, and once that happens, Alice has no way of knowing whether a sound has executed or not. In the case of events, the sound is executed in a separate thread from the event , and so again Alice is not able to directly control when a sound stops. In Alice 3, it is possible to set some parameters for the playing of a sound, where to start it, how long it should play, but again, once the sound is handed off with those parameters, Alice no longer controls execution.

The best way to handle this problem is to synchronize the sound with the action as closely as possible by editing the sound file for length in an audio editing program, such as Audacity.

Later,
Don Slater

On Aug 6, 2013, at 4:39 PM, Rex McKanry <rmckanry at stchas.edu> wrote:

> Hi All,
> 
> I did play around with this question and it seems like Alice will play the entire sound before it allows an event to happen (onClick Listener type of event). What I tried was to change the properties of the play sound by clicking on an object but was unable to until the sound was done playing. The only way I can think of is to change the backend Java code after the project is completed in Alice 3 and opened in JavaBean.
> 
> Rex
> 
> ________________________________
> From: alice-teachers-bounces+rmckanry=stchas.edu at lists.andrew.cmu.edu [alice-teachers-bounces+rmckanry=stchas.edu at lists.andrew.cmu.edu] On Behalf Of Claude Guéganno [gueganno.c at stjolorient.fr]
> Sent: Tuesday, August 06, 2013 2:20 PM
> To: Alice educators
> Subject: Re: alice-teacher Stop Audio
> 
> You can also do that  with  "custom Audio source" in the popup menu when
> you click on the parameter of 'playAudio' .. but I guess that what Gustav wants to do  is more  =  to stop a sound
>  in an event listener , or in an asynchronous situation ..
> I have no  solution.. even playing a short silence does not stop the previous sound ...
> but I am also interested in a solution for this problem !
> all the best
> claude
> 
> 
> Le 05/08/2013 18:06, Mriginder Singh a écrit :
> 
> Dear Gustav
> We can shorten the length of the audio file to suit our requirements. It can easily be done using audacity audio editing software which is an open source.
> Regards
> 
> On Jul 31, 2013 6:26 AM, "André Gustavo Schaeffer" <andre_schaeffer at yahoo.com.br<mailto:andre_schaeffer at yahoo.com.br>> wrote:
> Hi all.
> We have the playAudio procedure, but is it possible to STOP an audio that is currently playing?
> 
> André Gustavo Schaeffer
> andre_schaeffer at yahoo.com.br<mailto:andre_schaeffer at yahoo.com.br>
> https://sites.google.com/site/andregustavoschaeffer
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
> 
> 
> 
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
> 
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers



More information about the alice-teachers mailing list