/* * call-seq: * Music.autoload( filename ) -> Surface or nil * * Searches each directory in Music.autoload_dirs for a file with * the given filename. If it finds that file, loads it and returns * a Music instance. If it doesn't find the file, returns nil. * * See Rubygame::NamedResource for more information about this * functionality. * */ VALUE rg_music_autoload( VALUE klass, VALUE namev ) { VALUE pathv = rb_funcall( klass, rb_intern("find_file"), 1, namev ); if( RTEST(pathv) ) { return rg_music_load( klass, pathv ); } else { return Qnil; } }