Mercurial > hg > octave-nkf
changeset 19767:62ca016dbb2a
audiodevinfo.cc: Stop playback in audioplayers destructor (bug ##43994)
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Tue, 13 Jan 2015 12:50:43 +0100 |
parents | 9b90d8579c61 |
children | 72304a4e010a |
files | libinterp/dldfcn/audiodevinfo.cc |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/audiodevinfo.cc +++ b/libinterp/dldfcn/audiodevinfo.cc @@ -441,7 +441,7 @@ { public: audioplayer (void); - ~audioplayer (void) {}; + ~audioplayer (void); // Overloaded base functions double player_value (void) const { return 0; } @@ -819,6 +819,15 @@ left (), right (), stream (0), output_parameters (), type () { } +audioplayer::~audioplayer (void) +{ + if (isplaying()) + { + warning ("audioplayer::~audioplayer: Interrupting playing audioplayer"); + stop (); + } +} + void audioplayer::print (std::ostream& os, bool pr_as_read_syntax) const {