Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WPF] Short snippets of sounds play on application start #66

Open
kristijan-boskovic opened this issue Mar 31, 2020 · 3 comments
Open

Comments

@kristijan-boskovic
Copy link

kristijan-boskovic commented Mar 31, 2020

I used your SimpleAudioPlayer for Xamarin.Forms application and it works perfectly. Recently I started working on the WPF application that has shared code with that Xamarin.Forms application. While each audio stream loads to a player on application start, a very short snippet (like 0.1 sec) of each .mp3 file is played. There may be an issue with resources, because I am getting these sounds from a resources project (which works perfectly with Xamarin.Forms). I tried using the WPF version of your NuGet package but the result was exact same. Thank you in advance!

EDIT: After investigating the problem I found out that the issue may be in MediaPlayer itself, since this SimpleAudioPlayer is based on MediaPlayer for WPF. I tried loading .mp3 files in bare MediaPlayer and I got the exact same outcome, short snippet playing on Open(uri) method.

@kristijan-boskovic kristijan-boskovic changed the title [WPF] Short snippets of sounds produced on loading [WPF] Short snippets of sounds play on application start Mar 31, 2020
@mycoalchen
Copy link

Have you found any answers on this? I'm having the same problem. :(

@kristijan-boskovic
Copy link
Author

Have you found any answers on this? I'm having the same problem. :(

Unfortunately not. In the end, I didn't need the sounds in my application, so I just ditched it.

@mycoalchen
Copy link

Thanks for the reply. Actually I found that moving the MediaPlayer setup out of the MainWindow constructor and into a separate play function worked, in case this helps anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants