Tracktion / tracktion_engine

Tracktion Engine module
Other
1.16k stars 148 forks source link

LevelMeasurer getNumActiveChannels always returns 1 #149

Closed hgroenenboom closed 1 year ago

hgroenenboom commented 1 year ago

While trying to use the LevelMeasurer::getNumActiveChannels() method, I noticed that the numActiveChannels field is never changed, so it is always set to 1.

drowaudio commented 1 year ago

Can I ask what the use case is? I think that might be a relic left over as the info seems duplicated in Client which is probably the better place to have it as that's where its used (in getAndClearAudioLevel).

Would that be ok if I added an accessor there?

hgroenenboom commented 1 year ago

I'm using the LevelMeasurer for a level visualizer and I was hoping to base the number of channels of the level visualizer from the number of channels analyzed in the LevelMeasurer, so I wanted to use getNumActiveChannels for that.

Having an accessor for the number of active channels in the Client would be perfect!

drowaudio commented 1 year ago

https://github.com/Tracktion/tracktion_engine/commit/89129f692d7818efda54a1df7f3cb31cea98927a

hgroenenboom commented 1 year ago

Thank you!