/* call-seq:
* load_audio( filename ) -> Music
*
* **NOTE:** Rubygame::Mixer::Music is DEPRECATED and will be removed
* in Rubygame 3.0. Please use the Rubygame::Music class instead.
*
* Load music from a file. Supports WAVE, MOD, MIDI, OGG, and MP3 formats.
*
* Raises SDLError if the music could not be loaded.
*/
VALUE rbgm_mixmusic_new(VALUE class, VALUE filev)
{
/* This feature will be removed in Rubygame 3.0. */
rg_deprecated("Rubygame::Mixer::Music", "3.0");
VALUE self;
Mix_Music* music;
music = Mix_LoadMUS( StringValuePtr(filev) );
if( music == NULL )
{
rb_raise(eSDLError, "Error loading audio music from file `%s': %s",
StringValuePtr(filev), Mix_GetError());
}
self = Data_Wrap_Struct( cOldMusic, 0, Mix_FreeMusic, music );
//rb_obj_call_init(self,argc,argv);
return self;
}