public void Dispose() { if (m_initOutput) { m_output.Dispose(); m_output = null; m_initOutput = false; } }
/// <summary> /// Releases managed and native resources /// </summary> /// <param name="disposing"></param> private void dispose(bool disposing) { if (!disposing) { return; } #if USE_LOCKING lock (aout) #endif { aout?.Dispose(); } }
/// <summary> /// Turns off the buzzer. /// </summary> public static void StopBuzzer() { if (!Sound.IsEnabled) { throw new Exception("You must enable Sound first."); } Sound.PWMOut.Stop(); if (AudioSwitch != null) { AudioSwitch.Dispose(); AudioSwitch = null; } }
public bool Teardown() { m_input.Dispose(); m_output.Dispose(); return(true); }