* 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.
This commit is contained in:
parent
3e101fb2cd
commit
367ff06ea4
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2004-05-07 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
Revert code reversion from 2004-04-03. So, revert to async I/O again.
|
Revert code reversion from 2004-04-03. So, revert to async I/O again.
|
||||||
|
|
|
@ -457,13 +457,13 @@ fhandler_dev_dsp::Audio_out::stop (bool immediately)
|
||||||
debug_printf ("waveOutClose rc=%d", rc);
|
debug_printf ("waveOutClose rc=%d", rc);
|
||||||
|
|
||||||
clearOwner ();
|
clearOwner ();
|
||||||
|
}
|
||||||
|
|
||||||
if (bigwavebuffer_)
|
if (bigwavebuffer_)
|
||||||
{
|
{
|
||||||
delete[] bigwavebuffer_;
|
delete[] bigwavebuffer_;
|
||||||
bigwavebuffer_ = NULL;
|
bigwavebuffer_ = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -859,13 +859,13 @@ fhandler_dev_dsp::Audio_in::stop ()
|
||||||
debug_printf ("waveInClose rc=%d", rc);
|
debug_printf ("waveInClose rc=%d", rc);
|
||||||
|
|
||||||
clearOwner ();
|
clearOwner ();
|
||||||
|
}
|
||||||
|
|
||||||
if (bigwavebuffer_)
|
if (bigwavebuffer_)
|
||||||
{
|
{
|
||||||
delete[] bigwavebuffer_;
|
delete[] bigwavebuffer_;
|
||||||
bigwavebuffer_ = NULL;
|
bigwavebuffer_ = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -1207,6 +1207,11 @@ fhandler_dev_dsp::close (void)
|
||||||
}
|
}
|
||||||
if (audio_out_)
|
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_;
|
delete audio_out_;
|
||||||
audio_out_ = NULL;
|
audio_out_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue