-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[macOS testing required] Fix cue shift/offset for SoundSourceCoreAudio #2129
[macOS testing required] Fix cue shift/offset for SoundSourceCoreAudio #2129
Conversation
Thank you for doing this remote. LGTM. Do you have a clue how many tracks are effected? In the last case this PR introduces a real issue while fixing a theoretical bug only. We should be sure that this is worth to merge and how to inform about side effects. Is the chroma for musicbrains lookups effected. |
It's a constant offset encoded depending on the file and read as |
We should only merge this PR after confirming that the frame index is now in fact calculated correctly! Another question is if we should merge this after confirmation? We need to if cue points should be portable within Mixxx across different platforms. And we need to if we would like to synchronize cue points with external sources, given that those sources apply the same rules as we do. At least we don't seem to be the only ones who didn't get it right in the first place. Thanks to some recent efforts in the open-source community this becomes apparent. |
Testing:
Links to the test files used in https://mixxx.zulipchat.com/user_uploads/2380/juWR0xjOUUpYXwUAhU4lnsY0/mixxx_cue_shift.ods can be found in the linked issues and the new FFmpeg branch. We also need to check which files are affected by this decoding fix to give an advice in the CHANGELOG. I'm not able to perform any tests on macOS and don't care as long as Apple is refusing to offer support for cross-platform development. |
Where can I find the first file specified in the test spreadsheet? |
@ferranpujolcamins are you in charge to test this? |
Yes, I'm in touch with @uklotzde |
Tests are failing for the additional files added during the FFmpeg integration. |
Tests should be fixed. The offset calculations seem to be correct, but we need some more testing in the wild. I've improved the error reporting to detect unexpected behavior. |
Merge? |
I think this still needs some manual testing from a macOS user? @ferranpujolcamins, @benis? |
I addition to manual testing, can we automate this somehow so that the CI can warn us if something breaks? Couldn't we take some public domain/Creative-Commons-licensed track, encode it with a bunch of different encoders and then write tests for it? |
We have already automated tests for the different sound sources. |
@uklotzde How should we test exactly? Same test than the other time? |
We currently only check for consistency when decoding a single file. Consistently decoding the wrong signal would pass the test, because we don't have any reference files with their expected decoded signal. Decoding the same file with different decoders could be an option, but this only allows a limited number of combinations and we would have to assume that those decoders are actually available. Moreover, our test files don't reflect properly the multitude of encoders, versions, and settings that occur in the wild. |
@ferranpujolcamins The developer docs don't clearly state if and how to account for the leading or trailing frames of the converter. Debug assertions should reveal any false assumptions about the total file length. If cue points of .mp3 and .m4a files with leading frames > 0 don't change then we are safe. A log message for printing this information could be added temporarily to tryOpen() for identifying such files. |
I don't think I can help unfortunately, I wiped my Mac recently and haven't bothered to set up my development environment again. I wasn't getting much of a response when I asked for assistance with things and I ended up losing interest. |
Can we just merge this and wait for feedback during the beta phase? |
I'm confident that the changes do not introduce any major issues. The logging has been improved, so we hopefully get more detailed reports in case of unexpected behavior. Feedback and a LGTM from one or more macOS user(s) would be desirable. |
Since it looks like there are no MacOS testers around, shall we merge? |
Merge? |
Yes. |
As discussed on Zulip: https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/Cue.20shift.2Foffset
All unit tests pass, but extensive manual testing is required! Existing cue points might be shifted for some MP3 files.
Related:
digital-dj-tools/dj-data-converter#3