예제 #1
0
 public void Dispose()
 {
     if (m_initOutput)
     {
         m_output.Dispose();
         m_output     = null;
         m_initOutput = false;
     }
 }
예제 #2
0
        /// <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();
            }
        }
예제 #3
0
        /// <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;
            }
        }
예제 #4
0
 public bool Teardown()
 {
     m_input.Dispose();
     m_output.Dispose();
     return(true);
 }