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

RecorderThread: Write duration to FLAC STREAMINFO metadata block #20

Merged
merged 1 commit into from
May 23, 2022

Conversation

chenxiaolong
Copy link
Owner

MediaCodec's FLAC encoder does not write the final duration to the
STREAMINFO metadata block. The streaming nature of the API makes that
impossible. Instead, when the recording completes, BCR will find the
STREAMINFO block and update the total frame count field manually.

This fixes seeking in audio players that don't try to guess the length
of the audio file.

Fixes: #19

MediaCodec's FLAC encoder does not write the final duration to the
STREAMINFO metadata block. The streaming nature of the API makes that
impossible. Instead, when the recording completes, BCR will find the
STREAMINFO block and update the total frame count field manually.

This fixes seeking in audio players that don't try to guess the length
of the audio file.

Fixes: #19
Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong self-assigned this May 23, 2022
@chenxiaolong chenxiaolong merged commit dda4ece into master May 23, 2022
@chenxiaolong chenxiaolong deleted the flac-duration branch May 23, 2022 23:42
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.

Can't tap on seek bar nor total duration is showing
1 participant