private void AudioRecorder_StateChanged(object sender, RecorderStateChangedEventArgs e)
        {
            Console.WriteLine("[AudioRecorder_StateChanged] " + e.PreviousState + " --> " + e.CurrentState);
            switch (e.CurrentState)
            {
            case RecorderState.Idle:
                _state = AudioRecordState.Idle;
                break;

            case RecorderState.Paused:
                _state = AudioRecordState.Paused;
                break;

            case RecorderState.Ready:
                _state = AudioRecordState.Ready;
                break;

            case RecorderState.Recording:
                _state = AudioRecordState.Recording;
                break;
            }

            stateCallbacks(sender, (AudioRecordState)e.PreviousState, (AudioRecordState)e.CurrentState);
        }
Esempio n. 2
0
 void recorder_StateChanged(object sender, RecorderStateChangedEventArgs e)
 {
     Console.WriteLine("Recorder state changed from " + e.PreviousState + " to " + e.State);
 }
 private void OnStateChanged(object sender, RecorderStateChangedEventArgs e)
 {
     // TODO: Insert code to handle the recorder state changes.
     // Logger.Info($"Recorder state changed: {e.PreviousState} > {e.CurrentState}");
 }