private async void ELPSaudio_PointerReleased(object sender, PointerRoutedEventArgs e) { lock (o) { recording = false; } GRIDrecord.Opacity = 1; STRBDrecord.Stop(); SCALEaudio.ScaleX = SCALEaudio.ScaleY = 1; try { audioStream = await recorder.StopRecording(); APaudio.SetSource(audioStream.CloneStream()); //Length = APaudio.TotalLength; }catch { Constants.BoxPage.ShowMessage("录制失效!"); } }
private async void ELPSaudio_PointerPressed(object sender, PointerRoutedEventArgs e) { lock (o) { recording = true; } Length = 0; Counter(); GRIDrecord.Opacity = 0.6; STRBDrecord.Begin(); await recorder.Record(); /*try * { * await recorder.Record(); * } * catch * { * Constants.BoxPage.ShowMessage("录音失败!"); * return; * }*/ }