Hi,

The whole pichture is the following:

You need to monitor the modify_counter value returned by
SNDCTL_MIXERINFO. If it has changed then you need to read all controls
and check if their value has changed. In this way you can detect if some
other application has changed the values. Remember that the changes made
by the application itself also increment modify_counter.

MIXF_POLL indicates controls that reflect the outside world. They are
likely to change their value at any moment. Peak meter controls can also
change their value in this way even they don't have MIXF_POLL flag.

ENUMINFO is usually static. However if the version field is != 0 then
the value may change. The version field will then be incremented every
time a change happens.

Hannu
---
16.12.2010 22.43, o...@lilltiger.se wrote:
>  On Thu, 16 Dec 2010 22:24:18 +0200, Hannu Savolainen 
>  <ha...@opensound.com> wrote:
>> Hi,
>>
>> MIXF_POLL tells that the value may change when the state of the 
>> device
>> changes. For this reason the application should check the value
>> periodically (for example once per second) and to update the GUI if 
>> the
>> value has changed.
> 
>  Again I ask, what does this imply, you pretty much quoted the 
>  documentation but gave no explenation.
>  Is it only the value you get from "SNDCTL_MIX_READ" or can things like 
>  "SNDCTL_MIX_ENUMINFO" also change.
> 
>>
>> Best regards,
>>
>> Hannu
>> ---
>> 16.12.2010 21.55, o...@lilltiger.se wrote:
>>>  The docs say that it indicates that the control can change
>>>  spontainiolusy but what does this imply.
>>>
>>>  Let's say the control is an "MIXT_MUTE" then i presume it would
>>>  onlychnage if it's on or off.
>>>  So all one have to do is to read the value once a second and update 
>>> the
>>>  GUI control.
>>>
>>>  But how does it change more advanced controls like "MIXT_ENUM", can 
>>> it
>>>  change the different options that is avaible, or just wich of  the
>>>  options that is selected, or can it change both.
>>>
>>>  Is there any guidelines to how it may change an control?
>>>
>>>  / Lilltiger
>>> _______________________________________________
>>> oss-devel mailing list
>>> oss-devel@mailman.opensound.com
>>> http://mailman.opensound.com/mailman/listinfo/oss-devel
>>
>> _______________________________________________
>> oss-devel mailing list
>> oss-devel@mailman.opensound.com
>> http://mailman.opensound.com/mailman/listinfo/oss-devel
> 
> _______________________________________________
> oss-devel mailing list
> oss-devel@mailman.opensound.com
> http://mailman.opensound.com/mailman/listinfo/oss-devel

_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to