Any plans to support WASM / Browser?
- Dominant language
- C#
- Stars
- 512
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
first of all: Thanks for this great library.
Today I tried to use it with Linux and it worked flawlessly. Unfortunately when using an AvaloniaUI Cross Platform GUI Application and trying to start the WASM / Browser build, there is an error:
Unsupported Operating System: Browser
Since this is a wrapper for miniaudio and miniaudio seems to support WASM builds, I would like to ask, if you plan to integrate support for WASM or if I missed something
miniaudio works on all the major desktop and mobile platforms, including Windows, macOS, Linux, BSD, iOS, Android and Web (via Emscripten).
Examples:
- C# Project: https://github.com/sandreas/eduart
- Short 1s Audio: animal-voice.zip
- Online Base64 Converter: https://base64.guru/converter/encode/file
I basically ran all this using the AvaloniaUI xplat example and the SoundFlow example from the readme using a MemoryStream to rule out local file accessing errors:
using var audioEngine = new MiniAudioEngine(44100, Capability.Playback);
//
var audioBytes = Convert.FromBase64(".....");
var audioStream = new MemoryStream(audioBytes);
// Create a SoundPlayer and load an audio file
var player = new SoundPlayer(new StreamDataProvider(audioStream));
// Add the player to the master mixer
Mixer.Master.AddComponent(player);
// Start playback
player.Play();
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported Unsupported Operating System: Browser failure in MiniAudioEngine and the linked eduart ViewModels/HomeViewModel.cs example, then compare it with the SoundFlow README example using MemoryStream. Done means the AvaloniaUI Browser/WASM build supports the shown playback scenario without that error; no test file is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, wasm
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100