[Gambas-user] Playing MIDI file by using gb.SDL2.audio

Benoît Minisini gambas at ...1...
Tue Dec 30 23:59:16 CET 2014


Le 30/12/2014 23:12, Benoît Minisini a écrit :
> Le 30/12/2014 20:21, Ru Vuott a écrit :
>> Hi,
>> with rev. 6779 I saw the new resource to play audio files.
>>
>> Well, I would point out that, we can allow the execution also Midi
>> files, but it is necessary to implement the Class "Music" function
>>
>>         Mix_SetSoundFonts (const char * paths);
>>
>> (from file header: SDL_mixer.h)
>>
>>         * Next set ... SoundFonts paths to use by MIDI supported
>> backends * /
>>         extern int declspec SDLCALL Mix_SetSoundFonts (const char *
>> paths);
>>
>>
>>
>> In substance, the argument of the function provides the path where
>> soundbank file " .sf2 " is stored.
>>
>> Regards
>> vuott
>>
>>
>> P.S: I have already done work in Gambas with external SDL2 functions
>> declared by using "Extern" !
>> It works.
>>
>
> I don't see that function in the SDL2_mixer documentation... Where does
> it come from?
>

It seems that there is no documentation for it on the web. I must read 
the source code...

Apparently, you can define the SDL_FORCE_SOUNDFONTS environment variable 
to "1" and SDL_SOUNDFONTS with what you send to Mix_SetSoundFonts to 
define the sound font path.

Regards,

-- 
Benoît Minisini




More information about the User mailing list