enigma-dev / enigma-dev

The Extensible Non-Interpreted Game Maker Augmentation.
http://enigma-dev.org
342 stars 119 forks source link

libmpv-based audio system #2143

Closed time-killer-games closed 3 years ago

time-killer-games commented 3 years ago

libmpv supports all audio formats ffmpeg and fluidsynth does so that includes a lot of formats added support for we currently do not support natively such as midi. We will have way more audio support than YoYo at this rate.

I intend to add this myself but i wanted opinions from @JoshDreamland @fundies and @RobertBColton on this. I don't think libmpv supports loading files we have appended inside the executable so what I was proposing is any internal audio resources be extracted from the exe at runtime to a subfolder in the temp_directory. The subfolder was going to be named after the game executable name to ensure different games won't clash with each other's resources, either that or based on the process id to ensure a 100% guaranteed unique folder name per running game. It would be more ideal to use the game's display name but we haven't implemented that yet.

What are your all's thoughts on this before I open a pr and get started? This would give us working android audio and more formats support for all platforms than you can really imagine. More than enough to be a viable alternative or even a direct replacement for our DirectSound and OpenAL systems, but we'll still keep those obviously for legacy purposes. Also did you block me on GitHub robert after you told me you wouldn't? I find it dumb you keep on blocking me everywhere you can be such a drama maker and really disturb the peace when there is no good reason for it doing crap like this for imaginary reasons. I ask because it doesn't let me tag you.

I think you are just copy/pasting rusky's outrageous blocking habits he did it to even nik for literally no reason.

You deserve a better role model. One that doesn't default to being so negative.

I want to hurry up and say this before you edit out my unrelated talk on this issue. I just want to say that I've unblocked fundies because he's been a very good boy and I believe because I too have been a very good boy you Robert should consider responding to this naturally by being a good boy too and unblock me (and fundies too if applicable).

fundies commented 3 years ago

I would prefer an SDL audio system for android. Everything you want to use on android needs to be compiled for it. So going through libmpv and the 15 things it depends on similar to openal would also be a pain. SDL has already set up this build stuff for us so it would be easiest to just use their API.

The audio format doesn't really matter much to the audio system. Any audio system will play raw audio and any codec will convert files to raw audio. The only reason openal doesn't support midi (fluidsynth) or mp3 is because they're not enabled in the make file. As an example, one of the first things I wrote (with rusky) was libgme which takes sound files from NES and GBA and etc and decodes them for the audio systems.

As for extracting things off the exe: I want to allow users to choose whether to pack them on or not. This has been on my todo list for ages but there's a bunch of debt in the source that's been stopping me. (particularly the fact that AssetArray hasn't been full integrated for all resources). Once me or someone else gets this done it will be a big speed up on compile time. Also, it's better for someone wanting to offer updates or is dealing with licensing issues.

As for Robert, he's been gone for a month now. He closed any issues and PRs he had open. I'm not sure exactly what went wrong as I was trying my best to be nice to him. Apparently, I made some joke I don't even remember making and that pissed him off but I'm not sure. Either-way, he's not singling you out. It's probably best to just let him cool off instead of trying to ping him. We've all had our phases here when we were pissed off and wanted nothing to do with each other. I think/hope he will be back eventually.

time-killer-games commented 3 years ago

All points you raise are very good ones. I believe that's good enough reason to close this. Thanks for the info.