-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Enhancement] Re-add support for WAV audio (was present in at least Confrontation v1.1) #115
Comments
To my knowledge, we really can't do this. GameMaker: Studio 1.4 only has support for OGG files for streaming from disk. The reason Confrontation had WAV support is likely because of differences in pre-Studio versions of GameMaker. |
It would seem that I didn't get my edit in quick enough! Basically the sound effects supposedly are already WAV files, implying that AM2R already has the capability to decode them in some manner. |
Sound effects are not being streamed from disk. |
Well now the question would be, in the hypothetical situation where WAV music was hooked into the existing way that AM2R handles sound effects, would this mean that it'll store every single possible WAV music in RAM, or only the currently-playing WAV music in RAM? Much like disk space, RAM has also become less and less of an issue (my sister's free-from-the-carrier smartphone has more RAM than the PC that I did my original Confrontation v1.1 speed run on - 2GB VS 768MB - let alone the improvised NUC-like PC with 16GB of RAM I'm typing this from) and, because WAV is already uncompressed, the size of a WAV file is going to be exactly the amount of RAM that it'd take up. |
Some further poking suggests that one might be able to abuse buffers to load uncompressed audio from disc (at least in Studio 2, not sure about 1.4), but that has the significant drawback of loading the entire audio file into memory at once. That's not really ideal given how large the audio files we're talking about are and how weak some of our target platforms (Android) are. As far as how AM2R currently handles WAV files: they're baked into the datafile and lose the ability to be readily manipulated by end users. They're also totally loaded into memory when their audiogroup is in use. |
And since they're baked into the datafile, one would essentially have to recompile the game / mod the game for custom SFX (or in your case music) changes. Which would defeat the entire purpose of this request; have them easily replaceable as a feature without such drastic measures. |
Wait so, regardless of the possible RAM requirements (if it only loads the currently-playing song then I question the issue; on mobile I would imagine you'd run into CPU performance issues before RAM issues, or even OS compatibility issues and storage-capacity issues), are you basically saying that it isn't even possible to have external WAV files hook into the method that is currently used for sound effects? In other words, this idea would only work if they were packaged into the datafile, not with easily-accessable WAV files? |
Correct, we can't just pass WAVs into the default loading; we'd need to specially code for it and I'm not sure how the memory requirements stack up compared to normal. This is a GameMaker restriction, not an AM2R restriction. |
Well that's unfortunate. Unless a miracle happens and, for whatever reason, someone actually decides to do the heavy-lifting required to implement this, I guess I'll just have to try to get Doc to share the original uncompressed versions of the in-game music (so far I've not succeeded in that regard, though it's only been a week). |
AFAIK the original uncompressed versions are available on soundcloud under a creative commons license |
As I mentioned in my original forum thread linked in the first post here, the OST has a worse dynamic range than the in-game music to the point that, even with the lossy compression, the "HDR HQ music" can have a higher-quality result. Also there's the looping issue whereby the official OST is not designed around that and would require lots of manual editing (which I can do and have lots of experience with, but it still seems pointless when it's arguably a lower-fidelity starting point anyway) EDIT: Hmmm, my forum link is giving a 404 error now. Let me see if I can fix that... |
Sorry we couldn't be of more immediate help. I'll definitely look into audio streaming when I do a pass on audio for 2.0, but until then we're stuck here. On that note, you seem to be a very informed individual when it comes to audio; you wouldn't happen to do SFX work and be looking for a portfolio project, would you? While the OST's in a good state thanks to your pack on the forums (I believe it's the one Gatordile added as the HQ version), there's a lot of low-quality/ripped SFX that we're interested in redoing but lack the skill to make ourselves. We have one contact who's given us a few new sound effects, but he's been extremely busy ever since. |
Unfortunately sound effects are not something I have much experience with. Also, creation & composition in general is something that I have even less experience with - one could say that my knowledge and skillset could make one consider me a "mixing engineer" more than anything else. And yes, the high-quality music that's been used for years and years was the copy that I originally distributed. Also, I still have no idea why my old forum thread link works in Pale Moon but not LibreWolf. Nevertheless, a copy is on archive.org which works on LibreWolf: EDIT: Oh, and don't let me stop you (or anyone else) if one wants to support fancier lossless formats like FLAC and/or WavPack! :P |
Metroid Confrontation (at least v1.1) supported the use of WAV audio files for its music, but the final version of AM2R lacks this ability.
So, simply put, I think re-adding this could be a good idea.
In the past, the storage requirements of uncompressed WAV was much more of an issue but, as time has gone on, lossless formats like FLAC are more mainstream than ever, MP3 now has had all of its patents expired and, for most new use-cases, Opus has replaced Vorbis.
WAV support would provide the benefit of lossless audio support while being such a lowest-common-denominator that even people that have never heard of "OGG", "Vorbis", or "Opus" yet know of "MP3" tend to know what a WAV file is. And of course, WAV files are also gapless just like Vorbis and Opus.
I also considered the possibility of formats like FLAC, but I figured plain old WAV would be much easier to support due to its nature of just being straight-up uncompressed linear PCM.
The one niggle is that, depending on how support is implemented, one may need to still give WAV files a .ogg file name which may be a bit odd for less-savvy people that aren't aware that the file extension is merely a hint regarding the format rather than the rule (this of course wouldn't be an issue if files with a .WAV extension could actually be properly supported as was the case back in at least Metroid Confrontation v1.1)
My main interest was being able to modify the existing in-game music a little bit without having to worry about the generational-loss of re-encoding lossy audio into lossy audio a second times, especially when I've got literally hundreds of gigabytes free to work with...
Also fun fact, this is me:
http://am2r.freeforums.org/high-dynamic-range-hi-quality-500kbps-ogg-game-music-data-t2147.html
Mirror: https://web.archive.org/web/20210909040023/https://www.tapatalk.com/groups/am2r/high-dynamic-range-hi-quality-500kbps-ogg-game-music-data-t2147.html
EDIT: According to that forum thread, the sound effects are already WAV files, but I don't know how to check it myself since software-coding things are totally not my expertise (and I similarly can't test its capabilities, e.g. does it max out at 48kHz 16bit or can it even support 96kHz, 192kHz, etc at 24bit, 32 bit floating point, etc?)
Nevertheless, this makes me think that all that would be required is to somehow hook into this existing LPCM WAV decoder.
The text was updated successfully, but these errors were encountered: