--- src/sox.c.orig	Mon Jan 12 11:36:30 2009
+++ src/sox.c	Mon Jan 12 11:37:54 2009
@@ -2142,7 +2142,7 @@ static char const * device_name(char const * const typ
     return NULL;
   if (!strcmp(type, "sunau")) name = "/dev/audio";
   else if (!strcmp(type, "oss" ) || !strcmp(type, "ossdsp")) name = "/dev/dsp";
-  else if (!strcmp(type, "alsa") || !strcmp(type, "ao") || !strcmp(type, "coreaudio")) name = "default";
+  else if (!strcmp(type, "alsa") || !strcmp(type, "ao") || !strcmp(type, "coreaudio") || !strcmp(type, "sndio")) name = "default";
   return name? from_env? from_env : name : NULL;
 }
 
@@ -2154,6 +2154,7 @@ static char const * set_default_device(file_t * f)
   if (!f->filetype && sox_find_format("alsa", sox_false)) f->filetype = "alsa";
   if (!f->filetype && sox_find_format("oss" , sox_false)) f->filetype = "oss";
   if (!f->filetype && sox_find_format("sunau",sox_false)) f->filetype = "sunau";
+  if (!f->filetype && sox_find_format("sndio", sox_false)) f->filetype = "sndio";
   if (!f->filetype && sox_find_format("ao"  , sox_false) && file_count) /*!rec*/
     f->filetype = "ao";
 
