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

sndfile: write correct sample rate to WAV header #2976

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Mar 20, 2024

When the update functions are called the sample rate and format can't be
predicted. Thus the header has to be written when the first audio frame reaches
the filter.

Issue mentioned here: #2938 (comment)

@alfredh
Copy link
Collaborator

alfredh commented Mar 24, 2024

The decoder and filter should be set based on the codec negotiated in SDP.

When the first incoming RTP packet arrives, it will check the payload-type and possibly reset the decoder.

So I am not sure if this change is really needed.

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Mar 25, 2024

The sample rate can change if e.g. auplay_srate is set and auresamp module is loaded. It also depends on the order of the filters sndfile - auresamp, or auresamp - sndfile.

When the update functions are called the sample rate and format can't be
predicted. Thus the header has to be written when the first audio frame reaches
the filter.
@alfredh alfredh merged commit bb70d55 into baresip:main Mar 26, 2024
18 checks passed
@cspiel1 cspiel1 deleted the sndfile_correct_header branch March 27, 2024 14:56
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

2 participants