bigwavebuffer_ so that it is always cleaned, also in child processes.
(fhandler_dev_dsp::Audio_in::stop): Ditto.
(fhandler_dev_dsp::close): Stop audio play immediately in case of
abnormal exit.
+2004-05-07 Gerd Spalink <Gerd.Spalink@t-online.de>
+
+ * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Move delete of
+ bigwavebuffer_ so that it is always cleaned, also in child processes.
+ (fhandler_dev_dsp::Audio_in::stop): Ditto.
+ (fhandler_dev_dsp::close): Stop audio play immediately in case of
+ abnormal exit.
+
2004-05-07 Corinna Vinschen <corinna@vinschen.de>
Revert code reversion from 2004-04-03. So, revert to async I/O again.
debug_printf ("waveOutClose rc=%d", rc);
clearOwner ();
+ }
- if (bigwavebuffer_)
- {
- delete[] bigwavebuffer_;
- bigwavebuffer_ = NULL;
- }
+ if (bigwavebuffer_)
+ {
+ delete[] bigwavebuffer_;
+ bigwavebuffer_ = NULL;
}
}
debug_printf ("waveInClose rc=%d", rc);
clearOwner ();
+ }
- if (bigwavebuffer_)
- {
- delete[] bigwavebuffer_;
- bigwavebuffer_ = NULL;
- }
+ if (bigwavebuffer_)
+ {
+ delete[] bigwavebuffer_;
+ bigwavebuffer_ = NULL;
}
}
}
if (audio_out_)
{
+ if (exit_state != ES_NOT_EXITING)
+ { // emergency close due to call to exit() or Ctrl-C:
+ // do not wait for all pending audio to be played
+ audio_out_->stop (true);
+ }
delete audio_out_;
audio_out_ = NULL;
}