Esempio n. 1
0
 private void CurrentUseAudioDevice_PushingData(AudioDeviceDataContext value)
 {
     try
     {
         AACEncoder_EncData(_handle, value.Data, value.DataLength, (int)DateTime.Now.Ticks);
     }
     catch { }
 }
        private void AudioDevice_PushingData(AudioDeviceDataContext context)
        {
            int leftChannelLoudness  = 0;
            int rightChannelLoudness = 0;

            _debugAudioDevice.GetAudioLevel(context.Data, context.DataLength, ref leftChannelLoudness, ref rightChannelLoudness);
            if (leftChannelLoudness != _oldLeftChannelLoudness)
            {
                _oldLeftChannelLoudness = leftChannelLoudness;
                Dispatcher.Invoke(() =>
                {
                    MicrophoneLoudness.Value = leftChannelLoudness;
                });
            }
        }