Method works on Emulator but no on Microsoft Surface unit?
Posted
by
Roflcoptr
on Stack Overflow
See other posts from Stack Overflow
or by Roflcoptr
Published on 2011-02-14T22:28:23Z
Indexed on
2011/02/15
15:25 UTC
Read the original article
Hit count: 275
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();
}
© Stack Overflow or respective owner