Search Results

Search found 4 results on 1 pages for 'barrettj'.

Page 1/1 | 1 

  • Silverlight MediaElement Position Property Weirdness

    - by BarrettJ
    I have a MediaElement that is reporting its position incorrectly and weirdly, but consistently. It seems like when it gets to the last second of the audio (and it's always the last second, regardless if the sound is two seconds or 10), it doesn't update it's position until it finishes. Example output: Playback Progress: 0/3.99 - 0 Playback Progress: 0.01/3.99 - 0 Playback Progress: 0.03/3.99 - 0 Playback Progress: 0.06/3.99 - 1 Playback Progress: 0.07/3.99 - 1 Playback Progress: 0.08/3.99 - 2 Playback Progress: 0.11/3.99 - 2 Playback Progress: 0.14/3.99 - 3 Playback Progress: 0.19/3.99 - 4 Playback Progress: 0.23/3.99 - 5 Playback Progress: 0.25/3.99 - 6 Playback Progress: 0.28/3.99 - 7 Playback Progress: 0.3/3.99 - 7 Playback [SNIP] Playback Progress: 2.8/3.99 - 70 Playback Progress: 2.83/3.99 - 70 Playback Progress: 2.88/3.99 - 72 Playback Progress: 2.9/3.99 - 72 Playback Progress: 2.91/3.99 - 72 Playback Progress: 2.92/3.99 - 73 Playback Progress: 2.99/3.99 - 74 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3.99/3.99 - 100 That is the result of: WriteLine("Playback Progress: " + Position + "/" + LengthInSeconds + " - " + (int)((Position / LengthInSeconds) * 100)); public double Position { get { return my_media_element != null ? my_media_element.Position.TotalSeconds : 0; } } public double LengthInSeconds { get { return my_media_element != null ? my_media_element.NaturalDuration.TimeSpan.TotalSeconds : 0; } } Anyone have any ideas why this is occurring?

    Read the article

  • Problem with Core Data - EXC_BAD_ACCESS

    - by BarrettJ
    I'm using the following code and I'm getting an EXC_BAD_ACCESS when trying to get the count of objects - anyone have any idea why? Oddly enough, the error only happens if the count should be one or greater, if there are no objects it seems to work fine (it outputs null). NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"TVShow" inManagedObjectContext:[self managedObjectContext]]; [fetchRequest setEntity:entity]; [fetchRequest includesPendingChanges]; //NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ID == %@", showId]; //[fetchRequest setPredicate:predicate]; NSError *error; NSLog(@"Generating Count"); NSUInteger count = [[self managedObjectContext] countForFetchRequest:fetchRequest error:&error]; if(count == NSNotFound) { NSLog(@"error"); } else { NSLog(@"%@", count); // EXC_BAD_ACCESS here } [fetchRequest release];

    Read the article

  • Silverlight Out of Browser (OOB) app crashing only on OS X

    - by BarrettJ
    We have a Silverlight application that runs OOB (out of browser) so the user can install it. When it's running OOB we display a button that calls Application.Current.MainWindow.Close() so that the user can exit the application. This works perfectly fine on windows, but causes an error saying the application has quit unexpectedly on OS X. Anyone have any ideas why this might be? Thanks!

    Read the article

1