SDL_sound-patched-hg vs SDL2_mixer, ideas and questions. #36
Labels
No labels
RGSS accuracy
bug
compilation
discussion
documentation
duplicate
enhancement
invalid
performance issue
port request
question
ruby incompatibility
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: MapleShrine/mkxp#36
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Just doing a bit of reading around, and researching options for adding midi support to mkxp, and I keep on coming back to SDL2_mixer, which I had previously used for midi support in my prior abortive attempt at a native rgss player for linux, so I have to ask regarding the reasoning for using the patched sdl sound library.
The audio pipeline in mkxp looks like this: PhysFS(file IO) -> SDL_Sound / libvorbisfile(sample decoding) -> OpenAL(resampling / mixing) -> audio card. SDL2_mixer doesn't fit inside here because it does decoding, mixing and audio card submission in one. What I want is a pure decoding library, like fluidsynth.
ah, gotcha. I know SDL_mixer can do midi, as I've said and used before, was just wondering if there were some sort of say philosophical reason as to not want it. midi is a bit odd aint it...
No, there's no reasons why I'm not using SDL2_mixer besides technical ones. The library is too high level for my needs (I need to be able to manipulate buffers directly for eg. gapless vorbis looping in RGSS2), and its resampling support is atrocious. It's a good library if you just want very simple audio and "play this song" stuff (like SDL_Render), but for anything more sophisticated it is unsuited.
Besides, even if I was to use it, I still couldn't implement RGSS-exact midi looping with it without changing the source code.
Mayhaps one could work up our own midi library for mkxp.
You have to consider that midi is a huge specification with lots of fine details in it; writing yet another synthesizer implementation would probably be a bigger endeavor than mkxp itself. Fluidsynth already does most of what I need it to, I'd just have to write the midi event parsing code myself (I've experimented with this not long ago, with mixed results). Really, I just need to sit down with this again, bug the fluidsynth mailing list and figure out how to do this correctly.
yeah. sometimes you just gotta bug folks, lol. Hell I had to bug the mingw-w64 folks to patch their pthreads.h file :P