libgme/game-music-emu

List all supported extensions

Closed this issue · 2 comments

Original report by Damian Yerrick (Bitbucket: pino_p, ).


I am developing a music player and want to list all types that my music player's Game_Music_Emu plug-in can play. I can iterate through types with gme_type_list(), but all I can retrieve about each gme_type_t through the C API are the name of the console it's associated with (gme_type_system()) and and whether the type supports multiple movements (gme_type_multitrack()). I'd like to be able to look up the most common extension associated with a track. I can go from extension to type (gme_identify_extension()), but not the other way around.

I reported this to the maintainer of another fork of GME
kode54/Game_Music_Emu#7

He plans to fix it by adding a function with the following signature:

const char *gme_type_extension(gme_type_t);

Original comment by Michael Pyne (Bitbucket: mpyne, GitHub: mpyne).


Thanks for the report. I don't mind adding the same here.

Original comment by Michael Pyne (Bitbucket: mpyne, GitHub: mpyne).


Add simple accessor for file extension from a gme_type_t.

Fixes Issue #13