help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audioplayer


From: jayt0808
Subject: Re: audioplayer
Date: Sun, 5 Mar 2017 16:21:02 -0800 (PST)

I just created a fix that seems to solve the issue.  In your audioplayer
destructor, you don't actually call stop() when the object is destroyed. 
You only call it if the stream is still playing.  I so changed the code to
always call stop() when the destructor is called like so:

audioplayer::~audioplayer (void)
{
  printf("audioplayer destructor called\n");
  
  if (isplaying ())
    {
      warning ("Octave:audio-interrupt",
               "interrupting playing audioplayer");
//      stop ();
    }
  
  stop();
}

let me know if there is some problem with this.  But I am up and running
now, no more crashing when I reinstantiate the audioplayer object.  Ahh the
joys of open source.

-Jay




--
View this message in context: 
http://octave.1599824.n4.nabble.com/audioplayer-tp4682173p4682176.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]