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

flac: Allow different sample rate between frames #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gusted
Copy link

@Gusted Gusted commented Jun 10, 2024

FLAC encodes for each frame the sample rate of that frame, it is therefore to be expected that the sample rate changes between frames and is valid per FLAC's test vectors. This patch removes the sample rate check in strict_frame_header_check and updates the sample rate in the SignalSpec of the AudioBuffer after decoding a frame.

Ref: https://github.com/ietf-wg-cellar/flac-test-files/blob/main/uncommon/01%20-%20changing%20samplerate.flac

FLAC encodes for each frame the sample rate of that frame, it is
therefore to be expected that the sample rate changes between frames and
is valid per FLAC's test vectors. This patch removes the sample rate
check in `strict_frame_header_check` and updates the sample rate in the
SignalSpec of the AudioBuffer after decoding a frame.

Ref: https://github.com/ietf-wg-cellar/flac-test-files/blob/main/uncommon/01%20-%20changing%20samplerate.flac
@Gusted Gusted changed the title flac: Allow diffrent sample rate between frames flac: Allow different sample rate between frames Jun 10, 2024
@Gusted
Copy link
Author

Gusted commented Jun 10, 2024

There is a test vector that can be used to verify this, but I don't see how the flac crate is tested, so any help would be appreciated.

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.

None yet

1 participant