Mercurial > octave-nkf
comparison libinterp/dldfcn/audiodevinfo.cc @ 19614:478d35191196
maybe stop recorder in audio recorder destructor
* audiodevinfo.cc (audiorecorder::~audiorecorder): Call stop if
recorder is recording.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 15 Jan 2015 15:29:55 -0500 |
parents | f64cdbe11621 |
children | 6464cd19e0f4 |
comparison
equal
deleted
inserted
replaced
19613:0cc52d752f99 | 19614:478d35191196 |
---|---|
1293 | 1293 |
1294 class audiorecorder : public octave_base_value | 1294 class audiorecorder : public octave_base_value |
1295 { | 1295 { |
1296 public: | 1296 public: |
1297 audiorecorder (void); | 1297 audiorecorder (void); |
1298 ~audiorecorder (void) {}; | 1298 ~audiorecorder (void); |
1299 | 1299 |
1300 // Overloaded base functions | 1300 // Overloaded base functions |
1301 double player_value (void) const { return 0; } | 1301 double player_value (void) const { return 0; } |
1302 virtual double scalar_value (bool = false) const { return 0; } | 1302 virtual double scalar_value (bool = false) const { return 0; } |
1303 void print (std::ostream& os, bool pr_as_read_syntax = false) const; | 1303 void print (std::ostream& os, bool pr_as_read_syntax = false) const; |
1537 id (-1), fs (44100), nbits (16), channels (2), sample_number (0), | 1537 id (-1), fs (44100), nbits (16), channels (2), sample_number (0), |
1538 end_sample (-1), tag (""), y (), userdata (Matrix ()), | 1538 end_sample (-1), tag (""), y (), userdata (Matrix ()), |
1539 left (), right (), stream (0), input_parameters (), type () | 1539 left (), right (), stream (0), input_parameters (), type () |
1540 { } | 1540 { } |
1541 | 1541 |
1542 audiorecorder::~audiorecorder (void) | |
1543 { | |
1544 if (isrecording ()) | |
1545 { | |
1546 warning ("audiorecorder::~audiorecorder: Interrupting recording audiorecorder"); | |
1547 stop (); | |
1548 } | |
1549 } | |
1550 | |
1542 void | 1551 void |
1543 audiorecorder::print (std::ostream& os, bool pr_as_read_syntax) const | 1552 audiorecorder::print (std::ostream& os, bool pr_as_read_syntax) const |
1544 { | 1553 { |
1545 print_raw (os, pr_as_read_syntax); | 1554 print_raw (os, pr_as_read_syntax); |
1546 newline (os); | 1555 newline (os); |