Add ebur128_reset to reset measurements#101
Conversation
Useful when used as a Live Loudness Meter
| } | ||
|
|
||
| void ebur128_reset(ebur128_state *st) { | ||
| unsigned int i; |
There was a problem hiding this comment.
Some of this code is redundant with code in ebur128_init(). Maybe there could be a common function they both call?
| return EBUR128_SUCCESS; | ||
| } | ||
|
|
||
| void ebur128_reset(ebur128_state *st) { |
There was a problem hiding this comment.
This same effect could be achieved by the application by simply calling destroy() and init(). I think it would be worthwhile to discuss the need for this function (and the extra code to maintain). I am not against it, just opening discussion.
There was a problem hiding this comment.
Yes that's what I first think of but you would free and reallocate quite a few (other) things which may not be ideal in "live" operation. Of course you would not do that in the real-time audio thread but still.
There was a problem hiding this comment.
One more thing: if destroy() and init() is chosen, how would you achieve the Pause/Continue feature ? See #100
There was a problem hiding this comment.
I think that for Pause, you would stop sending data to the library and for Continue, you would resume sending data. So the application can just throw away audio data when paused.
There was a problem hiding this comment.
then the momentary value would not be computed any more, perhaps you still want it ?
There was a problem hiding this comment.
Perhaps. I guess I am not familiar with the use case for pause and which measurements should be paused and why.
There was a problem hiding this comment.
Pause should just not listening to the audio coming so no further values are calculated during that time.
While you are live you sometimes have to play something very different, e.g. for monitoring. Than just hit pause, play that other and then resume.
|
you should add ebur128_clear to ebur128.def |
|
any traction on this ? |
|
This pull request is not a priority in my opinion since a reset can be achieved by calling destroy/init. In fact, that is exactly what I do in MLT for live applications: https://github.com/mltframework/mlt/blob/master/src/modules/plus/filter_dynamic_loudness.c#L53 |
Useful when used as a Live Loudness Meter
Check #100