0

hey,

I've been reading awhile about events.

I can actually work with them and create custom events for booleans, integer, arrays, etc, but only for those I've created.

I cant seem to figure out how to add a listener upon a variable that I did not declare.

For exaple, via the CoreAudioAPI library I can readout the currrent speakerconfig. ie. 8. (= 7.1 surround).
Which is an integervalue (device.AudioMeterInformation.PeakValues.Count)

How Can I automatically fire an event when that value changes?
I mean, without using a small thread, timer, etc...

Is this even possible?

thx in advance,
Nick

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by kindt.nick
0

>How Can I automatically fire an event when that value changes? I mean, without using a small thread, timer, etc...


Yes! you can. Compare previous value and current value and raise an event if they are unequal.

0

Hey,

Thats what i did for now.

But I have used a time to periodically compare the two values and then fire an event.

So it is not possible to get this completely managed by the .NET system? So that I don't have to use a timer to periodically compare the values?

thx,
Nick

Edited by kindt.nick: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.