Method works on Emulator but no on Microsoft Surface unit?
- by Roflcoptr
I have the following code. The StartRecord method trows an error on the Microsoft Surface Unit. But when I'm testing it on the emulator, it all works great. Any hints how
1) to find the exception that is thrown on the Microsoft Surface Unit?
2) to find the error in the code? any assumptions?
private void StartRecord(object sender, ContactEventArgs e)
{
isRecording = true;
StartButton.IsEnabled = false;
recordTimer = new Timer(10);
recordTimer.Elapsed += new ElapsedEventHandler(recordTimer_Elapsed);
PlaybackRoot.Visibility = System.Windows.Visibility.Collapsed;
EllapsedRecord.Visibility = System.Windows.Visibility.Visible;
InputLevel.Visibility = System.Windows.Visibility.Visible;
long time = DateTime.Now.Ticks;
String fileName = Convert.ToString(time) + ".wav";
Console.WriteLine(fileName);
startTime = DateTime.UtcNow;
recordTimer.Start();
record = new AudioRecording(fileName);
record.getSampleAggregator().MaximumCalculated += new EventHandler<MaxSampleEventArgs>(AudioControl_MaximumCalculated);
record.start();
}