private void Start() { Stop(); try { PaGa.WaveFormatt fmt = new PaGa.WaveFormatt(44100, 16, 2); m_Player = new PaGa.WaveOutPlayer(-1, fmt, 16384, 3, new PaGa.BufferFillEventHandler(Filler)); m_Recorder = new PaGa.WaveInRecorder(-1, fmt, 16384, 3, new PaGa.BufferDoneEventHandler(DataArrived)); } catch { Stop(); throw; } }
try { /... } catch { //there are no cases when you should catch all and not use an instance of Exception Stop(); throw; }
try { /... } finally { //finally is specially designed for such cases Stop(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)