SDL_sound-patched-hg vs SDL2_mixer, ideas and questions. #36

Closed
opened 2014-06-13 00:55:14 +00:00 by hanetzer · 6 comments
hanetzer commented 2014-06-13 00:55:14 +00:00 (Migrated from github.com)

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.

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.
Ancurio commented 2014-06-13 02:02:22 +00:00 (Migrated from github.com)

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.

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.
hanetzer commented 2014-06-13 02:07:07 +00:00 (Migrated from github.com)

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...

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...
Ancurio commented 2014-06-13 02:12:22 +00:00 (Migrated from github.com)

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.

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.
hanetzer commented 2014-06-13 02:14:33 +00:00 (Migrated from github.com)

Mayhaps one could work up our own midi library for mkxp.

Mayhaps one could work up our own midi library for mkxp.
Ancurio commented 2014-06-13 02:30:16 +00:00 (Migrated from github.com)

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.

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.
hanetzer commented 2014-06-13 02:35:24 +00:00 (Migrated from github.com)

yeah. sometimes you just gotta bug folks, lol. Hell I had to bug the mingw-w64 folks to patch their pthreads.h file :P

yeah. sometimes you just gotta bug folks, lol. Hell I had to bug the mingw-w64 folks to patch their pthreads.h file :P
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#36
No description provided.