WebAssembly and sound effects
-
@terma-aba said in WebAssembly and sound effects:
I looked at Blazer.. Certainly interesting. I don't have the possibility to switch our desktop UI and system behind it over to Blazer, and it would massively increase our team costs if we have to maintain parallel source for same functionality.
Yes Blazor is totally new, also for me!
I have a little experience with C# but this is over 10 years ago!The advantage I see with Blazor, for my use case, is that debugging works out of the box. And doing Blazor for WebAssembly (and not ASP.Net), I can use it on any server (even with static pages), and it works with almost any device which is able to run a browser with WebAssembly support like FireFox, Chorme, Edge, Vivaldi and so on. Even the OS is not really relevant.
I will continue to develop app with Qt (for Windows/Linux/Android), but for WebAssembly my choice will be Blazor... Until Qt for WASM is going to be usable!
-
@KroMignon
Depending on your application type you could also use Wt (https://www.webtoolkit.eu/wt). Also bear in mind that WASM is "new" technology and isn't mature as others.I'm too trying to port my application to Qt WASM and I've stumbled on some shortcoming ins QWebsocket. But in my case I already have web client in Wt so I could play with WASM.
As you mentioned Blazor... I was looking into it by I don't like the way it is implemented. From what I've seen it is modifying the DOM and you couldn't write the whole application using C# only. You must use HTML somewhere and incorporate the C# code there. Am I right or I've been mislead by examples?
-
@Trigve said in WebAssembly and sound effects:
Am I right or I've been mislead by examples?
You right, Blazor is a mix of multiple technologies: HTML5+CSS+JavaScript+C# and optionally ASP.Net.
It is not my favorite combination, of course I would prefer doing it with C++/QML. But Qt WASM is far away to be usable, in my eyes and Blazor is just working.
I still have many to learn about Blazor, but in just 3 days I have built my first Blazor App which perfectly works on my PC (and Android or iOS smartphones) browser.
And that is pretty cool. -
@KroMignon said in WebAssembly and sound effects:
configuring QtCreator to be able to use Qt for WebAssembly take me days of search on internet and many tries until it work (about 3 days!)
Emscripten changed the configure files right after QtCreator came out with experimental WebAssembly support, and it takes QtCreator time to catch up. I would say stick to commandline building. You can stil use QtCreator for editing.
compiling a very simple example takes hours!
This has not much to do with Qt, this is all emscripten.
Not if you use a later version of Qt (5.15) and a more recent emscripten that does not compile to javascript first before then compiling to webassembly.not possible to play any sound
It is! I posted eample who - you just need to use javascript, which emscripten has several ways to implement - using macros or straight c++.
the generated result is huge!
Ya, well. it is statically linked. Suggested to use compression on the server.
-
@terma-aba said in WebAssembly and sound effects:
What worries me is that Qt for WASM does need attention (you are right), and I'm afraid that the focus will turn 100% to Qt 6 and WASM might be a forgotten platform for a long time.
Over the history of Qt for WebAssembly there has been only one or two people working on it- and Qt and it's modules are huge. Other platforms have a nice team of developers to maintain and develop new features for. People seem to think all the bits and pieces magically work once you get a build working. It has been quite a struggle and not like any other platform. Heck the platform itself is experimental and constantly moving, add the different browsers and each has their own implementation and bugs to go with it.
There are quite of bit of differences between normal platforms and WebAssembly, such as the javascript sandbox, threads not really available.
Qt6 Wasm will happen, the biggest block is having to move to building it with cmake.
-
@lorn-potter said in WebAssembly and sound effects:
It is! I posted eample who - you just need to use javascript, which emscripten has several ways to implement - using macros or straight c++.
I don't want to hurt you, there no raison for me to do it.
I have followed the Qt mailing lists, and I know that Qt embrasse many domains.
The Qt company had to made choices to ensure they will win enough money to pay their developers, which is fine.But I need a solution now to replace some Flash plugins I have developed for years.
I tried Qt WASM because I know Qt and QML and I know how to work with.
I tried it hard to made it works, and really takes days to be able to build successfully a basic example.
The build itself takes close to 15 minutes.
And I wasn't able to start debugger.Doing the same with Blazor was very easy, in one day I have installed all needed software, build a demo application (in less than 20 seconds on same machine) and be able to do debugging.
Those are fact, and I don't have so much time to create a new plugin.
My prefered choice would be Qt WASM but I have to be "raisonnable" and go with Blazor.
-
I noticed that QTBUG-69444
webassembly: support QtMultimedia (audio) is marked "Status:CLOSED, Resolution:Done, Fix Version/s: 6.2" and the merge seems to have happened on August 17. I am installing Qt 6.2.0-beta4 now and am going to test it out. I can see the platform target code in https://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/multimedia/platform/wasm?h=6.2.0 which contains the filesqwasmmediadevices.cpp qwasmmediadevices_p.h qwasmmediaintegration.cpp qwasmmediaintegration_p.h
and a subdirectory "audio" containing:
qwasmaudiodevice.cpp qwasmaudiodevice_p.h qwasmaudiosink.cpp qwasmaudiosink_p.h qwasmaudiosource.cpp qwasmaudiosource_p.h
Apologize for bumping this thread.
https://wiki.qt.io/Qt_for_WebAssembly still has qtmultimedia listed under "unsupported", though so I suspect there will be issues still.
-
Use QtGstreamer + gstreamer pipeline.
examples are here
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/examples.html -
@JoeCFD said in WebAssembly and sound effects:
Use QtGstreamer + gstreamer pipeline.
One could, but would have to build gstreamer and all it's friends with emscripten and then statically link that into the wasm binary.
Or, could just use QtMutimedia 6.2.
-
My apologies, what is the actual current status of Qt Multimedia for WebAssembly?
For some reason I couldn't make it work for me. I realize this thread is already quite old and may not get noticed soon, so I created a new topic about my issue here:
https://forum.qt.io/topic/136931/qsoundeffect-for-webassembly
Thanks,
Peter