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

  if( RTEST(pathv) )
  {
    return rg_sound_load( klass, pathv );
  }
  else
  {
    return Qnil;
  }
}