Commit 0f1cc109 authored by Jan Schmidt's avatar Jan Schmidt

sys/oss/: Allow the AUDIODEV environment variable to redirect us to a...

sys/oss/: Allow the AUDIODEV environment variable to redirect us to a different default OSS device, like sunaudiosink...

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).
parent ee1f115e
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):
......
......@@ -235,9 +235,14 @@ gst_oss_sink_class_init (GstOssSinkClass * klass)
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;
}
......
......@@ -230,10 +230,16 @@ gst_oss_src_get_property (GObject * object, guint prop_id,
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment