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

mixausrc: fix ausrc resampling #2981

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Mar 29, 2024

  • Fixes resampling of audio source which is mixed into the stream.
  • Does some code cleanup.
  • Adds warning if sample format is not supported.

Because auresamp filter can be loaded at arbitrary position, the sample rate has to be taken from the stream in functions encode()/decode().

mentioned here: #2938 (comment)

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Apr 2, 2024

Tested mixing into

  • the encode stream
  • the decode stream
    with module aufile and WAV files
  • Microsoft PCM, 16 bit, mono 8000 Hz
  • Microsoft PCM, 16 bit, mono 16000 Hz
  • Microsoft PCM, 16 bit, mono 32000 Hz
    which works.

The following formats bring a useful warning and stops mixing

  • ITU G.711 mu-law -> "mixausrc: sample format PCMU not supported"
  • Microsoft PCM, 16 bit, mono 44100 Hz -> "mixausrc: could not initialize a resampler (Operation not supported [95])"

Ready for merge from my side. Any suggestions?

@sreimers sreimers merged commit 8f8b3a0 into baresip:main Apr 2, 2024
18 checks passed
@cspiel1 cspiel1 deleted the mixausrc_resample_fixes branch April 2, 2024 07:52
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