/* call-seq: * fade_out( fade_time ) -> self * * Gradually fade the music to silence over +fade_length+ seconds. * After the fade is complete, the music will be automatically stopped. * * Raises SDLError if something goes wrong. * * fade_time:: Time until the music is totally silent, in seconds. */ VALUE rbgm_mixmusic_fadeout(VALUE self, VALUE fadev) { int fade = (int)(NUM2DBL(fadev) * 1000); int result = Mix_FadeOutMusic(fade); if ( result < 0 ) { rb_raise(eSDLError, "Error fading out music: %s", Mix_GetError()); } return self; }