spooky isaac
I want a page to play music in my WPF app, I have it working at the minute, but there is a problem.
private void Page_Loaded(object sender, RoutedEventArgs e)
{
BackgroundMusic.Play();
}
private void BackgroundMusic_MediaEnded(object sender, RoutedEventArgs e)
{
BackgroundMusic.Position = TimeSpan.Zero;
BackgroundMusic.Play();
}
I'm using .NET 8.0
After clicking on the page multiple times, RAM usage goes on the app goes to like 2GB and and the audio starts crackling and slowing down.
6 replies