octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #43964] octave 4.1.0+ audio changes will not c


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #43964] octave 4.1.0+ audio changes will not compile on Windows
Date: Thu, 15 Jan 2015 20:28:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Iceweasel/30.0

Follow-up Comment #19, bug #43964 (project octave):

Yes the destructor should be called.  I made the following change to
audiodevinfo.cc:


diff --git a/libinterp/dldfcn/audiodevinfo.cc
b/libinterp/dldfcn/audiodevinfo.cc
--- a/libinterp/dldfcn/audiodevinfo.cc
+++ b/libinterp/dldfcn/audiodevinfo.cc
@@ -1295,7 +1295,7 @@
 {
 public:
   audiorecorder (void);
-  ~audiorecorder (void) {};
+  ~audiorecorder (void);
 
   // Overloaded base functions
   double player_value (void) const { return 0; }
@@ -1539,6 +1539,15 @@
     left (), right (), stream (0), input_parameters (), type ()
 { }
 
+audiorecorder::~audiorecorder (void)
+{
+  if (isrecording ())
+    {
+      warning ("audiorecorder::~audiorecorder: Interrupting recording
audiorecorder");
+      stop ();
+    }
+}
+
 void
 audiorecorder::print (std::ostream& os, bool pr_as_read_syntax) const
 {


I do see the message from the destructor if I do


  r = audiorecorder ();
  record (r);
  r = audiorecorder ();


The destructor should be called even if the object is not currently recording,
but I think stopping recording should only be needed if it is actually
currently recording.  What is your hg ID?  Mine is


  0cc52d752f99+ tip @


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43964>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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