mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
Various small fixes.
Original commit message from CVS: Various small fixes.
This commit is contained in:
parent
e7b7c1d6d7
commit
2211a01d91
2 changed files with 6 additions and 6 deletions
|
@ -212,7 +212,7 @@ gst_audiosink_sync_parms (GstAudioSink *audiosink)
|
||||||
|
|
||||||
if (audiosink->fd == -1) return;
|
if (audiosink->fd == -1) return;
|
||||||
|
|
||||||
ioctl (audiosink->fd,SNDCTL_DSP_RESET, 0);
|
ioctl (audiosink->fd, SNDCTL_DSP_RESET, 0);
|
||||||
|
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_SETFMT, &audiosink->format);
|
ioctl (audiosink->fd, SNDCTL_DSP_SETFMT, &audiosink->format);
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_CHANNELS, &audiosink->channels);
|
ioctl (audiosink->fd, SNDCTL_DSP_CHANNELS, &audiosink->channels);
|
||||||
|
@ -273,7 +273,7 @@ gst_audiosink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (GST_BUFFER_DATA (buf) != NULL) {
|
if (GST_BUFFER_DATA (buf) != NULL) {
|
||||||
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
||||||
//g_print("audiosink: writing to soundcard\n");
|
//g_print("audiosink: writing to soundcard\n");
|
||||||
if (audiosink->fd > 2) {
|
if (audiosink->fd >= 0) {
|
||||||
if (!audiosink->mute) {
|
if (!audiosink->mute) {
|
||||||
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
||||||
|
@ -357,7 +357,7 @@ gst_audiosink_open_audio (GstAudioSink *sink)
|
||||||
sink->fd = open("/dev/dsp", O_WRONLY);
|
sink->fd = open("/dev/dsp", O_WRONLY);
|
||||||
|
|
||||||
/* if we have it, set the default parameters and go have fun */
|
/* if we have it, set the default parameters and go have fun */
|
||||||
if (sink->fd > 0) {
|
if (sink->fd >= 0) {
|
||||||
/* set card state */
|
/* set card state */
|
||||||
sink->format = AFMT_S16_LE;
|
sink->format = AFMT_S16_LE;
|
||||||
sink->channels = 2; /* stereo */
|
sink->channels = 2; /* stereo */
|
||||||
|
|
|
@ -212,7 +212,7 @@ gst_audiosink_sync_parms (GstAudioSink *audiosink)
|
||||||
|
|
||||||
if (audiosink->fd == -1) return;
|
if (audiosink->fd == -1) return;
|
||||||
|
|
||||||
ioctl (audiosink->fd,SNDCTL_DSP_RESET, 0);
|
ioctl (audiosink->fd, SNDCTL_DSP_RESET, 0);
|
||||||
|
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_SETFMT, &audiosink->format);
|
ioctl (audiosink->fd, SNDCTL_DSP_SETFMT, &audiosink->format);
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_CHANNELS, &audiosink->channels);
|
ioctl (audiosink->fd, SNDCTL_DSP_CHANNELS, &audiosink->channels);
|
||||||
|
@ -273,7 +273,7 @@ gst_audiosink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (GST_BUFFER_DATA (buf) != NULL) {
|
if (GST_BUFFER_DATA (buf) != NULL) {
|
||||||
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
||||||
//g_print("audiosink: writing to soundcard\n");
|
//g_print("audiosink: writing to soundcard\n");
|
||||||
if (audiosink->fd > 2) {
|
if (audiosink->fd >= 0) {
|
||||||
if (!audiosink->mute) {
|
if (!audiosink->mute) {
|
||||||
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
||||||
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
||||||
|
@ -357,7 +357,7 @@ gst_audiosink_open_audio (GstAudioSink *sink)
|
||||||
sink->fd = open("/dev/dsp", O_WRONLY);
|
sink->fd = open("/dev/dsp", O_WRONLY);
|
||||||
|
|
||||||
/* if we have it, set the default parameters and go have fun */
|
/* if we have it, set the default parameters and go have fun */
|
||||||
if (sink->fd > 0) {
|
if (sink->fd >= 0) {
|
||||||
/* set card state */
|
/* set card state */
|
||||||
sink->format = AFMT_S16_LE;
|
sink->format = AFMT_S16_LE;
|
||||||
sink->channels = 2; /* stereo */
|
sink->channels = 2; /* stereo */
|
||||||
|
|
Loading…
Reference in a new issue