Prev: Invalid handle errors
Next: polar plot for half plane
From: Sermed on 25 Dec 2009 08:50 Thanks again Leslie It worked with the normal functions but not with the GUI-functions... However, I found that one can use "playblocking(player)" instead of "play(player)" and it will do the purpose nicely :o) Sermed "Leslie McBrayer" <lmcbrayer(a)mathworks.com> wrote in message <hh058k$j3k$1(a)fred.mathworks.com>... > > 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. > |