/* call-seq:
 *  driver_name -> string 
 *
 *  **NOTE:** This method is DEPRECATED and will be removed in
 *  Rubygame 3.0. Please use the Rubygame.audio_driver instead.
 *
 *  Returns the name of the audio driver that SDL is using.
 *
 *  May raise an SDLError if initialization fails.
 */

VALUE rbgm_mixer_getdrivername(VALUE module)
{
  /* This feature will be removed in Rubygame 3.0. */
  rg_deprecated("Rubygame::Mixer", "3.0");

  char driver_name[1024];
  if(SDL_AudioDriverName(driver_name, sizeof(driver_name)) == NULL)
  {     
    rb_raise(eSDLError, "Error fetching audio driver name: %s", SDL_GetError());
  }
  return rb_str_new2(driver_name);
}