openbsd-ports/devel/gstreamer-plugins/patches/patch-sys_sunaudio_gstsunaudio_c
2004-12-22 06:09:18 +00:00

58 lines
2.2 KiB
Plaintext

$OpenBSD: patch-sys_sunaudio_gstsunaudio_c,v 1.1.1.1 2004/12/22 06:09:18 marcm Exp $
--- sys/sunaudio/gstsunaudio.c.orig Tue Oct 26 17:08:45 2004
+++ sys/sunaudio/gstsunaudio.c Mon Dec 6 21:47:33 2004
@@ -28,7 +28,10 @@
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/audioio.h>
+#include <string.h>
#include "gstsunelement.h"
#include "gstsunmixer.h"
@@ -183,8 +186,8 @@ gst_sunaudiosink_class_init (GstSunAudio
gstelement_class->change_state = gst_sunaudiosink_change_state;
g_object_class_install_property (gobject_class, ARG_DEVICE,
- g_param_spec_string ("device", "Device", "Audio Device (/dev/audio)",
- "/dev/audio", G_PARAM_READWRITE));
+ g_param_spec_string ("device", "Device", "Audio Device (/dev/sound)",
+ "/dev/sound", G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_BUFFER_SIZE,
g_param_spec_int ("buffer_size", "Buffer Size", "Buffer Size",
1, G_MAXINT, 64, G_PARAM_READWRITE));
@@ -209,7 +212,7 @@ gst_sunaudiosink_init (GstSunAudioSink *
audiodev = g_getenv ("AUDIODEV");
if (audiodev == NULL)
- audiodev = "/dev/audio";
+ audiodev = "/dev/sound";
sunaudiosink->device = g_strdup (audiodev);
}
@@ -295,10 +298,9 @@ gst_sunaudiosink_setparams (GstSunAudioS
ainfo.play.sample_rate = sunaudiosink->rate;
ainfo.play.channels = sunaudiosink->channels;
ainfo.play.precision = sunaudiosink->width;
- ainfo.play.encoding = AUDIO_ENCODING_LINEAR;
+ ainfo.play.encoding = AUDIO_ENCODING_SLINEAR;
ainfo.play.port = ports;
ainfo.play.buffer_size = sunaudiosink->buffer_size;
- ainfo.output_muted = 0;
ret = ioctl (sunaudiosink->fd, AUDIO_SETINFO, &ainfo);
if (ret == -1) {
@@ -342,10 +344,6 @@ gst_sunaudiosink_open (GstSunAudioSink *
}
GST_INFO ("monitor_gain %d", sunaudiosink->info.monitor_gain);
- GST_INFO ("output_muted %d", sunaudiosink->info.output_muted);
- GST_INFO ("hw_features %08x", sunaudiosink->info.hw_features);
- GST_INFO ("sw_features %08x", sunaudiosink->info.sw_features);
- GST_INFO ("sw_features_enabled %08x", sunaudiosink->info.sw_features_enabled);
return TRUE;
}