[desktop-discuss] gst-mixer using AUDIODEV

Brian Cameron Brian.Cameron at Sun.COM
Thu Aug 16 08:30:46 PDT 2007


Doug:

>    Just looking at the JDS patched gst-mixer code. It seems to be 
> inconsistent with the man pages for other commands.
> Adding the '/dev/' is not required. The mixerctl man page states that 
> the AUDIODEV environment contains the full path name.

Thank you for catching this.  I reviewed the sunaudio sink in the
gst-plugins-good module and verified that this code works as you say
it should, without prepending the "/dev/".  I've updated the patch
so we no longer prepend "/dev/" to fix this problem.

That said, this patch is going to go away in the near future, once
OSS goes into Nevada.  So probably not worth spending too much more
time improving this area of the code.  Once we start using the
ossmixer, then this special code to make gnome-volume-control able
to talk to the SunAudio interfaces directly goes away.

Brian


> gnome-media-2.18.0/gst-mixer/src/track.c
>    with patch gnome-media-03-supportdevices.diff
> 
>      audiodev = g_getenv ("AUDIODEV");
>      if (audiodev == NULL) {
>        mixer_fd = open ("/dev/audioctl", O_RDWR | O_NONBLOCK);
>      } else {
>        gchar *device = g_strdup_printf ("/dev/%sctl", audiodev);
>        mixer_fd = open (device, O_RDWR | O_NONBLOCK);
>        g_free (device);
>      }
> 
> 
> doug at prae> man mixerctl
> .....
> ENVIRONMENT VARIABLES
>      AUDIODEV     If the -d and -a options are not specified, the
>                   AUDIODEV  environment variable is consulted. If
>                   set, AUDIODEV will contain the full  path  name
>                   of the user's default audio device. The default
>                   audio device will be converted into  a  control
>                   device, and then used. If the AUDIODEV variable
>                   is not set, /dev/audioctl is used.
> 
> FILES
>      /dev/audioctl
>      /dev/sound/{0...n}ctl
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org



More information about the desktop-discuss mailing list