Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move calculation of waveform extents to high-level API #149

Open
mr-smidge opened this issue Feb 12, 2025 · 0 comments
Open

Move calculation of waveform extents to high-level API #149

mr-smidge opened this issue Feb 12, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@mr-smidge
Copy link
Contributor

A user of libdjinterop who wishes to attach a waveform to a track might be interested to know if there are any recommended (or required) sizes of the waveform to attach. The library currently offers functions for this, but they are specialised to Engine DJ and still require some "inside" knowledge of the Engine database's specific schema.

For example, Mixxx has some nasty code like this:

        djinterop::waveform_extents extents = dbSchemaVersion >=
                        djinterop::engine::engine_schema::schema_2_18_0
                ? e::calculate_overview_waveform_extents(
                          frameCount, pTrack->getSampleRate())
                : e::calculate_high_resolution_waveform_extents(
                          frameCount, pTrack->getSampleRate());

Instead, it might be better if there is a function available as part of the high-level API, along the lines of:

djinterop::waveform_extents calculate_recommended_waveform_extents(const database& db, unsigned long long sample_count, double sample_rate);
@mr-smidge mr-smidge added the good first issue Good for newcomers label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant