[oss-devel] ossxmix patch to ignore empty mixer groups
Zakhar Levchenko
zlevchenko at gmail.com
Wed Jun 4 01:22:18 EEST 2008
On 5/17/08, Hannu Savolainen <hannu at opensound.com> wrote:
>
> Many thanks Clive!
>
> I have applied this patch to the current version. However see my comments.
>
>
> Clive Wright wrote:
> > Hi,
> >
> > Drivers for oss_hdaudio and perhaps other soundcards may contain empty
> > groups in their mixer definitions.
> >
> > This results in empty gtk v/hboxes being displayed in ossxmix which
> > serve no purpose and take up screen space unnecessarily.
> >
> > The attached patch for ossxmix prevents these empty boxes from being
> > displayed.
> >
> > I cannot envisage a mixer definition in which the final record would
> > be a mixer group so have not taken any action to prevent i+1 exceeding n.
>
> Actually there may be cases where an empty group is created (which in
> fact may be the last one). Then it will get populated later. So this
> patch may actually caise problems.
>
> This kind of approach is used at least with the new vmix version I'm
> currently working on. It will allocate virtual engines on-demand. So
> initially the mixer interface will have an empty group for the output
> controls (per-application peak meters and volume sliders). Then this
> group will be populated when applications open the audio devices.
>
> Better solution might be to create the widgets for groups as hidden ones
> and to show them at the moment when some content is added to the group.
> This is actually a very trivial change.
>
> Btw, with the new vmix it's possible that new controls get added on fly
> and without notice. This may actually happen rather frequently. So
> ossxmix (and other v4 mixers) should poll SNDCTL_MIX_NREXT once per few
> seconds and to add the new controls to to the GUI whenever it seens
> them. Also this change should be very trivial.
>
> Best regards,
>
> Hannu
> _______________________________________________
> oss-devel mailing list
> oss-devel at mailman.opensound.com
> http://mailman.opensound.com/mailman/listinfo/oss-devel
>
Hi,
I want add some notes about this patch. This patch is incorrect and causes
troubles because some controls are not shown at all. For example, rate, sync
and some other controls are not shown for my sound card. The same problem is
reported by Temujin on the forum. The criterion used to ignore some groups
is weird. I think that group may be ignored if no other mixer control uses
it as a parent (this requires however checking all mixer controls in a
loop). This however is not checked at all. Instead strange comparison of
parents of adjacent controls is used. Maybe this works for some hdaudio
drivers mentioned by Clive but causes troubles in general. So this patch
should be revised and rewritten. I probably can do it myself, but I have no
problems with empty groups so I can't check if any my changes solve the
initial problem described by Clive.
Regards,
Zakhar Levchenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.opensound.com/pipermail/oss-devel/attachments/20080604/a685831c/attachment.htm
More information about the oss-devel
mailing list