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).
This commit is contained in:
Jan Schmidt 2007-12-07 19:29:39 +00:00
parent ee1f115ef9
commit 0f1cc10947
3 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,11 @@
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):

View file

@ -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;
}

View file

@ -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);
}