I've always basically seen the Sound Player extension as essential, for the same reason. Not being able to reference sounds in expressions makes lots of things more complicated than it otherwise would be
I've always basically seen the Sound Player extension as essential, for the same reason. Not being able to reference sounds in expressions makes lots of things more complicated than it otherwise would be
problem is I need it for iOS![]()
The Sound Player extension has a huge drawback, it resets the sound engine at the start of every frame, so any background sound loops and music can't keep playing across frames. This makes it unusable for me.
What I end up doing is using fusions built in "play sample file on specific channel" function and then use "(soundChannel + 1) mod 32" as a formula for selecting channels. It's far from a good solution though as any longer samples will get overwritten as the mod function reselects the same same channel when there's a lot of sounds triggering.
If we could get a "play sample file on free channel" action, or use channel nr 0 as the "free" channel (like the Sound Player extension does) these problems would be solved and this extra work unnecessary.
Why is this needed in the first place? If you have a set of 5 different sounds for explosions for example, and you want to randomly select which one to play every time an explosion happens, this would allow you to use "explosion" + randomNr + ".ogg" as an expression to select which file to play. I use this all the time to make the game sound more dynamic and interesting. Hearing the exact same sound play every time something happens just sound repetitive and boring after a while, not to mention unprofessional.
Couldn’t you just test against a random number in ‘compare two’ and play a different sound? You could even use child events to make it cleaner.
Well, for sounds that are hard coded sure, you can make 10 child events and play a different sound... but this does not help if you have sounds that are not hard coded into the game but are defined using a string value in an editor.
For example, I have a weapons editor and for each wepaon there is a sound it makes when it fires which is decided by a string that corresponds to the sample file.
We have the ability to play samples by entering a file name, and now we even have the ability to preload these sounds into memory for quicker access (which is great, thank you!), but we don't have the ability to let fusion select the available channel to play this sound on. This makes the function very hard to use since you seldom have a fixed channel in mind when you want to play a sound, you simply want it to play and not interrupt other sounds.
There is a logcat inside that report - but I've made another one and removed everything other than the logcat: https://1drv.ms/t/s!AgVEPtcaHQ02mL5z...TAUpw?e=UFwQTk
It starts from when I activate the report - until I close the app - after the sound error has happened at least twice.
The first time the sound doesn't play the phone vibrates instead of playing the sound - thereafter the phone is silent instead of playing the sounds - and then spontaneously starts playing the sounds again a few seconds later.
This happens with all my games that have a lot of sounds in them - the games with the sound errors: one has 15 sounds, 2 have 21 sounds, one has 19 sounds. I have no problem with games that have only 5 or 6 sounds in them.
The sounds were working in 292.3 - I did not change any code since then - other than the display (immersive mode etc.)
I don't think I can recreate this error in a .mfa with just the sounds.
no pointing to MMFRuntime find in this log either
"about it was working in 292.3", please remember this version used ANT building procedure and a lower API, from there we must start.
any chances you send me an APK link by PM?
the mfa with sounds is to check the media information from each one or check it with mediainfo and post in a zip, also let em know if you are playing them from disk or internally, thanks in advance
Regards,
Fernando Vivolo
... new things are coming ...
The MMF Runtime log is there from: 10-14 17:00:04.272 10179 31377 31377 I MMFRuntime: onCreate, runtime version: Fusion 292.0
If you open it in Notepad ++ - it starts from line 2467 and ends at line 3809.
Every game has different sounds in them - I'm not sure what media information you want? I'll send you the .apk and a screenshot of the sounds - (you'd be able to extract them in Android studio).