Original commit message from CVS:
* sys/oss/gstosssink.c:
* sys/oss/gstosssrc.c:
Allow the AUDIODEV environment variable to redirect us
to a different default OSS device, like sunaudiosink does
on Solaris (makes audio play automatically on SunRays).
+2007-12-07 Jan Schmidt <jan.schmidt@sun.com>
+
+ * sys/oss/gstosssink.c:
+ * sys/oss/gstosssrc.c:
+ Allow the AUDIODEV environment variable to redirect us
+ to a different default OSS device, like sunaudiosink does
+ on Solaris (makes audio play automatically on SunRays).
+
2007-12-06 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audiofx/audioamplify.c: (gst_audio_amplify_transform_ip):
static void
gst_oss_sink_init (GstOssSink * osssink)
{
+ const gchar *device;
+
GST_DEBUG_OBJECT (osssink, "initializing osssink");
- osssink->device = g_strdup (DEFAULT_DEVICE);
+ device = g_getenv ("AUDIODEV");
+ if (device == NULL)
+ device = DEFAULT_DEVICE;
+ osssink->device = g_strdup (device);
osssink->fd = -1;
}
static void
gst_oss_src_init (GstOssSrc * osssrc, GstOssSrcClass * g_class)
{
+ const gchar *device;
+
GST_DEBUG ("initializing osssrc");
+ device = g_getenv ("AUDIODEV");
+ if (device == NULL)
+ device = DEFAULT_DEVICE;
+
osssrc->fd = -1;
- osssrc->device = g_strdup (DEFAULT_DEVICE);
+ osssrc->device = g_strdup (device);
osssrc->device_name = g_strdup (DEFAULT_DEVICE_NAME);
}