Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's a very naive attempt to fix a bug with AirPods (24kHZ sample rate) recorded voice messages.
I just added "resampling" code similar to what it's already there for 16kHZ. Now in my self-built version of Telegram client, I haven't got a speedup of recording and voice pitch.
Actually, it would be better to write universal re-sampling code, but I'm pretty bad in audio and in swift to do it myself.
During the research I also found that in iOS client (https://github.com/TelegramMessenger/Telegram-iOS/blob/702f2547830ca406ce41081ea4170f24533f9a01/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift ) there's pretty similar part of code for audio recording but it doesn't have transcoding and it works great with AirPods, actually I don't know why, but it's too much differences to easily port it to this project for me.
#112 #590 #692