Prev: Invalid handle errors
Next: polar plot for half plane
From: Sermed on 22 Dec 2009 18:50 Dear all I'm working on a GUI where I play a sound signal using "soundsc"... I want to design a button in the GUI that stops the soundsc anybody knows how that can be done/ or is there any function that stops the sound playing. thanks in advance and Merry Chrismas Sermed
From: Leslie McBrayer on 23 Dec 2009 14:15 > I'm working on a GUI where I play a sound signal using "soundsc"... I want > to design a button in the GUI that stops the soundsc > anybody knows how that can be done/ or is there any function that stops > the sound playing. You could play the signal with audioplayer and use the stop (or pause) method. For more information, type "doc audioplayer" at the command prompt.
From: Sermed on 24 Dec 2009 07:34 Thanks a lot Leslie ... I've just tried it and it seems that it is work perfectly,, Merry Chrismas "Leslie McBrayer" <lmcbrayer(a)mathworks.com> wrote in message <hgtq8p$bt4$1(a)fred.mathworks.com>... > > I'm working on a GUI where I play a sound signal using "soundsc"... I want > > to design a button in the GUI that stops the soundsc > > anybody knows how that can be done/ or is there any function that stops > > the sound playing. > > You could play the signal with audioplayer and use the stop (or pause) > method. For more information, type "doc audioplayer" at the command prompt. >
From: Sermed on 24 Dec 2009 09:13 Hey agian I got another problem while implementing the audioplayer in GUI. As you know the GUI is a multipul of functions and it seems that the audioplayer is terminated when the function is ended. That means that the 60 seconds wav.file is terminated after 1 second.... Any suggestions Best Sermed "Sermed " <sermadrid(a)hotmail.com> wrote in message <hgvn3q$1a5$1(a)fred.mathworks.com>... > Thanks a lot Leslie ... I've just tried it and it seems that it is work perfectly,, > > Merry Chrismas > > > "Leslie McBrayer" <lmcbrayer(a)mathworks.com> wrote in message <hgtq8p$bt4$1(a)fred.mathworks.com>... > > > I'm working on a GUI where I play a sound signal using "soundsc"... I want > > > to design a button in the GUI that stops the soundsc > > > anybody knows how that can be done/ or is there any function that stops > > > the sound playing. > > > > You could play the signal with audioplayer and use the stop (or pause) > > method. For more information, type "doc audioplayer" at the command prompt. > >
From: Leslie McBrayer on 24 Dec 2009 11:35
> As you know the GUI is a multipul of functions and it seems that the > audioplayer is terminated when the function is ended. > That means that the 60 seconds wav.file is terminated after 1 second.... I don't have GUI-specific experience, but it is true that audioplayer objects only persist within the function that creates them. One way to work around this is to modify the function to include an output argument, such as: function outputObj = myPlayFunction(myInputs) outputObj = audioplayer(...); When you call the function, you'll create a variable in the current workspace that you can then pause or stop. |