Skip to content

Commit

Permalink
Use AL_DIRECT_CHANNELS_SOFT for audio playback.
Browse files Browse the repository at this point in the history
See #2580.
  • Loading branch information
john-preston committed Nov 16, 2018
1 parent 9101d64 commit e3b6e13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Telegram/SourceFiles/media/media_audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ void Mixer::Track::createStream(AudioMsgId::Type type) {
alSource3f(stream.source, AL_POSITION, 0, 0, 0);
alSource3f(stream.source, AL_VELOCITY, 0, 0, 0);
alSourcei(stream.source, AL_LOOPING, 0);
alSourcei(stream.source, AL_DIRECT_CHANNELS_SOFT, 1);
alGenBuffers(3, stream.buffers);
if (type == AudioMsgId::Type::Voice) {
mixer()->updatePlaybackSpeed(this);
Expand Down

2 comments on commit e3b6e13

@vyamkovyi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, if there was some idea behind Telegram supporting surround sound formats, this will do the trick by fixing the sound for simple stereo users but trying to play 5.1 stream directly on stereo output will cause some channels to be still dropped.

@stek29
Copy link
Contributor

@stek29 stek29 commented on e3b6e13 Jan 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hexawolf see discussion in #2580

Please sign in to comment.