mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +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;
|
||||
|
||||
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_CHANNELS, &audiosink->channels);
|
||||
|
@ -273,7 +273,7 @@ gst_audiosink_chain (GstPad *pad, GstBuffer *buf)
|
|||
if (GST_BUFFER_DATA (buf) != NULL) {
|
||||
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
||||
//g_print("audiosink: writing to soundcard\n");
|
||||
if (audiosink->fd > 2) {
|
||||
if (audiosink->fd >= 0) {
|
||||
if (!audiosink->mute) {
|
||||
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
||||
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
||||
|
@ -357,7 +357,7 @@ gst_audiosink_open_audio (GstAudioSink *sink)
|
|||
sink->fd = open("/dev/dsp", O_WRONLY);
|
||||
|
||||
/* if we have it, set the default parameters and go have fun */
|
||||
if (sink->fd > 0) {
|
||||
if (sink->fd >= 0) {
|
||||
/* set card state */
|
||||
sink->format = AFMT_S16_LE;
|
||||
sink->channels = 2; /* stereo */
|
||||
|
|
|
@ -212,7 +212,7 @@ gst_audiosink_sync_parms (GstAudioSink *audiosink)
|
|||
|
||||
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_CHANNELS, &audiosink->channels);
|
||||
|
@ -273,7 +273,7 @@ gst_audiosink_chain (GstPad *pad, GstBuffer *buf)
|
|||
if (GST_BUFFER_DATA (buf) != NULL) {
|
||||
gst_trace_add_entry(NULL, 0, buf, "audiosink: writing to soundcard");
|
||||
//g_print("audiosink: writing to soundcard\n");
|
||||
if (audiosink->fd > 2) {
|
||||
if (audiosink->fd >= 0) {
|
||||
if (!audiosink->mute) {
|
||||
gst_clock_wait (audiosink->clock, GST_BUFFER_TIMESTAMP (buf), GST_OBJECT (audiosink));
|
||||
ioctl (audiosink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
|
||||
|
@ -357,7 +357,7 @@ gst_audiosink_open_audio (GstAudioSink *sink)
|
|||
sink->fd = open("/dev/dsp", O_WRONLY);
|
||||
|
||||
/* if we have it, set the default parameters and go have fun */
|
||||
if (sink->fd > 0) {
|
||||
if (sink->fd >= 0) {
|
||||
/* set card state */
|
||||
sink->format = AFMT_S16_LE;
|
||||
sink->channels = 2; /* stereo */
|
||||
|
|
Loading…
Reference in a new issue