mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-29 20:35:40 +00:00
sys/sunaudio/gstsunaudio.c: Solve #152805.
Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * sys/sunaudio/gstsunaudio.c: (gst_sunaudiosink_setparams): Solve #152805. * sys/sunaudio/gstsunmixer.c: (gst_sunaudiomixer_set_mute): Solve 152806.
This commit is contained in:
parent
1b6c3e0efa
commit
e2513e5415
3 changed files with 24 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-10-01 Balamurali Viswanathan <balamurali.viswanathan@wipro.com>
|
||||
|
||||
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* sys/sunaudio/gstsunaudio.c: (gst_sunaudiosink_setparams):
|
||||
Solve #152805.
|
||||
* sys/sunaudio/gstsunmixer.c: (gst_sunaudiomixer_set_mute):
|
||||
Solve 152806.
|
||||
|
||||
2004-10-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c:
|
||||
|
|
|
@ -276,6 +276,19 @@ gst_sunaudiosink_setparams (GstSunAudioSink * sunaudiosink)
|
|||
{
|
||||
audio_info_t ainfo;
|
||||
int ret;
|
||||
int ports;
|
||||
|
||||
ret = ioctl (sunaudiosink->fd, AUDIO_GETINFO, &ainfo);
|
||||
if (ret == -1) {
|
||||
GST_ELEMENT_ERROR (sunaudiosink, RESOURCE, SETTINGS, (NULL), ("%s",
|
||||
strerror (errno)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ports = ainfo.play.port;
|
||||
if (!(ports & AUDIO_SPEAKER) && (ainfo.play.avail_ports & AUDIO_SPEAKER)) {
|
||||
ports = ports | AUDIO_SPEAKER;
|
||||
}
|
||||
|
||||
AUDIO_INITINFO (&ainfo);
|
||||
|
||||
|
@ -283,7 +296,7 @@ gst_sunaudiosink_setparams (GstSunAudioSink * sunaudiosink)
|
|||
ainfo.play.channels = sunaudiosink->channels;
|
||||
ainfo.play.precision = sunaudiosink->width;
|
||||
ainfo.play.encoding = AUDIO_ENCODING_LINEAR;
|
||||
ainfo.play.port = AUDIO_SPEAKER;
|
||||
ainfo.play.port = ports;
|
||||
ainfo.play.buffer_size = sunaudiosink->buffer_size;
|
||||
ainfo.output_muted = 0;
|
||||
|
||||
|
|
|
@ -130,8 +130,7 @@ fill_labels (void)
|
|||
{
|
||||
gchar *given, *wanted;
|
||||
}
|
||||
cases[] =
|
||||
{
|
||||
cases[] = {
|
||||
{
|
||||
"Vol ", N_("Volume")}
|
||||
, {
|
||||
|
@ -279,13 +278,10 @@ gst_sunaudiomixer_set_mute (GstMixer * mixer,
|
|||
return;
|
||||
|
||||
AUDIO_INITINFO (&audioinfo);
|
||||
ioctl (sunaudio->mixer_fd, AUDIO_GETINFO, &audioinfo);
|
||||
|
||||
if (mute) {
|
||||
audioinfo.play.port = audioinfo.play.avail_ports;
|
||||
audioinfo.output_muted = 1;
|
||||
} else {
|
||||
audioinfo.play.port = 0;
|
||||
audioinfo.output_muted = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue