Skip to content

Conversation

@renaud-sc
Copy link

Useful when used as a Live Loudness Meter

Check #100

Useful when used as a Live Loudness Meter
}

void ebur128_reset(ebur128_state *st) {
unsigned int i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this code is redundant with code in ebur128_init(). Maybe there could be a common function they both call?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully agree

return EBUR128_SUCCESS;
}

void ebur128_reset(ebur128_state *st) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

@renaud-sc renaud-sc Feb 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing: if destroy() and init() is chosen, how would you achieve the Pause/Continue feature ? See #100

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

@renaud-sc renaud-sc Feb 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then the momentary value would not be computed any more, perhaps you still want it ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps. I guess I am not familiar with the use case for pause and which measurements should be paused and why.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@rsp4jack
Copy link

you should add ebur128_clear to ebur128.def

@luzpaz
Copy link

luzpaz commented Jul 30, 2023

any traction on this ?

@bmatherly
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants