Skip to content

Conversation

@smallketchup82
Copy link

@smallketchup82 smallketchup82 commented Apr 4, 2024

Prerequisite for ppy/osu#27793

Adds support for Volume Fx and Bassloud. Merges ManagedBass#124 and ManagedBass#121 with some custom bug fixes and patches to make them work. Also gets this branch up to date with ManagedBass master. Tested and works on MacOS and Windows

Another prerequisite for my PR is updated ppy.ManagedBass.* nuget packages, so if you can, please upload updated versions of the following packages if & when this gets merged:

  • ppy.ManagedBass
  • ppy.ManagedBass.Fx
  • ppy.ManagedBass.Loud (this will also be new)

Comment on lines 720 to 748
/// <summary>
/// BassLoud add-on: Loudness in LUFS of the last 400ms or the duration (in milliseconds) specified in the HIWORD
/// </summary>
BassLoudnessCurrent = 0,

/// <summary>
/// BassLoud add-on: Integrated loudness in LUFS. This is the average since measurement started.
/// </summary>
BassLoudnessIntegrated = 1,

/// <summary>
/// BassLoud add-on: Loudness range in LU.
/// </summary>
BassLoudnessRange = 2,

/// <summary>
/// BassLoud add-on: Peak level in linear scale.
/// </summary>
BassLoudnessPeak = 4,

/// <summary>
/// BassLoud add-on: True peak level in linear scale.
/// </summary>
BassLoudnessTruePeak = 8,

/// <summary>
/// BassLoud add-on: Automatically free the measurement when the channel is freed.
/// </summary>
BassLoudnessAutofree = 0x8000,
Copy link

Choose a reason for hiding this comment

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

  • broken indentation
  • bit flag enums should use compile-time constant expressions with bit shifts or hex/binary literals

Copy link
Author

@smallketchup82 smallketchup82 Apr 5, 2024

Choose a reason for hiding this comment

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

Addressed 1

The rest of the file doesn't seem to do 2, I believe that we should stay consistent. Either we change everything, or nothing.

Remove BASS_Loudness from names and change to PascalCase
Changed these for internal testing and forgot to revert, oops
the project fails to load otherwise (i have no idea why lol)
@smallketchup82
Copy link
Author

BassLoud support has been merged into upstream ManagedBass#124

There are some differences (mainly with the function names) between the BassLoud bindings in this PR and upstream. Should we switch to match upstream or continue with our implementation?

@smoogipoo
Copy link

We should probably just use upstream.

@smallketchup82
Copy link
Author

I'll close this PR and create a new one getting this fork up to date with upstream. There's a couple of changes I want to make to upstream as well, so I'll submit those.

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.

7 participants