Discussion:
What does "MIXF_POLL" actually indicate?
o***@lilltiger.se
2010-12-16 19:55:39 UTC
Permalink
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
Hannu Savolainen
2010-12-16 20:24:18 UTC
Permalink
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.

Best regards,

Hannu
---
Post by o***@lilltiger.se
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
http://mailman.opensound.com/mailman/listinfo/oss-devel
o***@lilltiger.se
2010-12-16 20:43:15 UTC
Permalink
On Thu, 16 Dec 2010 22:24:18 +0200, Hannu Savolainen
Post by Hannu Savolainen
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.
Post by Hannu Savolainen
Best regards,
Hannu
---
Post by o***@lilltiger.se
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
http://mailman.opensound.com/mailman/listinfo/oss-devel
_______________________________________________
oss-devel mailing list
http://mailman.opensound.com/mailman/listinfo/oss-devel
Yair K.
2010-12-16 21:02:21 UTC
Permalink
Post by o***@lilltiger.se
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.
I'm pretty sure only the control's value is change, and not the control
itself. ossxmix simply polls the MIXF_POLL controls regularly.

Yours,
Yair K.
Hannu Savolainen
2010-12-18 09:00:12 UTC
Permalink
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
---
Post by o***@lilltiger.se
On Thu, 16 Dec 2010 22:24:18 +0200, Hannu Savolainen
Post by Hannu Savolainen
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.
Post by Hannu Savolainen
Best regards,
Hannu
---
Post by o***@lilltiger.se
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
http://mailman.opensound.com/mailman/listinfo/oss-devel
_______________________________________________
oss-devel mailing list
http://mailman.opensound.com/mailman/listinfo/oss-devel
_______________________________________________
oss-devel mailing list
http://mailman.opensound.com/mailman/listinfo/oss-devel
Loading...