-
Notifications
You must be signed in to change notification settings - Fork 13
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
How do I play an audio file that is INSIDE the executable? #10
Comments
It wasn't designed with that scenario in mind. It would require adding the SourceStream property. Which player implementation are you using? And in which scenario do you need a player interface for internal audios? |
Retro form-based videogame development. I don't think I would be able to produce a proper signed .apk Android version without that feature, so that is my scenario. And the whole purpose of Avalonia is to have a multiplatform GUI. Adding that feature (ideally being able to use Avalonia Resources) together with an example would be much appreciated. Strangely enough, using bass.dll and bassflac.dll from INSIDE the Win executable works (instead of them being inside the same folder as the .exe file). Instead of crashing on init, it shows the music player, but the music player says it couldn't read the media file or a generic message akin to that. This means that the Avalonia Bass Player is the only bottleneck that prevents me from doing that.
|
Any news? Are you willing to implement it? |
It should be pretty trivial change; just been really busy with other priorities lately. Feel free to make the changes to the repo. The only part that will require a bit of care is making sure there's no bugs or conflicts between setting Source or SourceStream; but at the end of the day, setting Source is really setting the SourceStream. |
What is trivial to you is not trivial to me. Besides - the main reason why I am using this library is NOT to have to code it myself, because I am trying to code something else entirely. :p |
ok started taking a look. Indeed it's not as trivial as I thought. |
😊 |
The examples only contain absolute paths, which are pretty much useless in most scenarios.
So far I have been unable to load it as an Avalonia resource, i.e. avares://blahblah
If I use a relative path, it won't work in all cases, as most publishing configurations I have pack the entire application into one file. How do I reference the audio file in that case?
The text was updated successfully, but these errors were encountered: