8000 extend with PD MOD/XM player by r-lyeh-archived · Pull Request #6 · mackron/miniaudio · GitHub
[go: up one dir, main page]

Skip to content

extend with PD MOD/XM player - #6

Merged
mackron merged 2 commits into
mackron:devfrom
r-lyeh-archived:master
Nov 18, 2017
Merged

mackron merged 2 commits into
mackron:devfrom
r-lyeh-archived:master

Conversation

@r-lyeh-archived
Copy link
Copy Markdown
Contributor

No description provided.

@mackron
mackron commented Nov 17, 2017
Copy link
Copy Markdown
Owner

Thanks for this! I'll add support for dr_flac and stb_vorbis and merge this when I'm done with this raylib work.

@r-lyeh-archived
Copy link
Copy Markdown
Contributor Author

Yeah np. I created it as a basis for #5. Feel free to modify it as needed (it's very näive!). It needs some more work.

Maybe the next step to do is to create a generic sample struct that holds sample type, sample rate, channels, function pointer to constructor, function pointer to destructor, and function pointer to sound mixer (feeder), so the main() function will work more or less in a "generic" way.

@mackron
mackron commented Nov 17, 2017
Copy link
Copy Markdown
Owner

An abstraction layer that wraps around dr_wav/dr_flac/stb_vorbis/etc called mal_decoder is planned. The way it'll work is that if dr_wav.h, etc is included before the implementation of mini_al, it'll seamlessly add support for that particular decoder:

#include "dr_wav.h"  // Enables support for WAV
#include "dr_flac.h" // Enables support for FLAC

#define MAL_IMPLEMENTATION
#include "mini_al.h"

mal_decoder will have basically the same API as dr_wav and dr_flac: mal_decoder_init(), mal_decoder_read_f32(), etc. with the added feature of allowing the application to control the output format/channels/rate using mini_al's format conversion functionality. Just not sure when I'll get around to all that, though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0