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

Audio player upmixes stereo to 5.1 #2580

Closed
kathampy opened this issue Oct 28, 2016 · 19 comments
Closed

Audio player upmixes stereo to 5.1 #2580

kathampy opened this issue Oct 28, 2016 · 19 comments

Comments

@kathampy
Copy link

Steps to reproduce

  1. Receive a stereo audio file some someone
  2. Play the audio in telegram
  3. Listen to center channel on a 5.1 speaker system

Expected behaviour

Only left and right channels should play.

Actual behaviour

Audio is upmixed to 5.1 channels.

Configuration

Operating system: Windows 10 Anniversary

Version of Telegram Desktop: 0.10.19

Logs

Insert logs here (if necessary)

You can type debugmode in settings and then see ~/.TelegramDesktop/DebugLogs/log_...txt for log files.
Type debugmode in settings again to disable logs.

@evgeniyp
Copy link

evgeniyp commented Feb 1, 2017

Also I hear something wrong with sound on common stereo system/headphones.

@kathampy
Copy link
Author

kathampy commented Feb 1, 2017

Yes, the algorithm is attempting to simulate a soundstage with any number of channels.

@DzmitryFil
Copy link

DzmitryFil commented Feb 21, 2017

I noticed something wrong with audio too, in the latest updates. Music is distorted in a way which makes vocals the loudest part. I'm not sure when the problem started, but it wasn't the case a couple of months ago. os - windows 10

@skrugly
Copy link

skrugly commented Feb 21, 2017

Same here

@cheetah-spottycat
Copy link

I can confirm this with V1.1.7 on Windows 10. Even when your sound device is stereo and you are playing a stereo sound file, some weird mixing between channels occurs.

It makes the internal sound player unusable, no file sounds like it should.

@vyamkovyi
Copy link

vyamkovyi commented Jan 16, 2018

Same for me and all my friends.
Sound on TDeskop is broken and there's no excuse.
Reported here

@daniel13gh
Copy link

Version 1.3 stable is there, still no fix for this issue. :(

@Lynesth
Copy link

Lynesth commented Oct 26, 2018

Having a similar issue with 1.4.3 on Windows 10.

Voice (from calls) is only coming out from central speakers and if I plug my headphones in the front-right speaker (which commands all of them) I don't get any voice.

Any update on this matter ?

Thank you.

@DJ-ZX
Copy link

DJ-ZX commented Nov 12, 2018

Are there any plans to fix this in the near future?

@vyamkovyi
Copy link

I wonder why would Telegram ever need to "simulate a soundstage" especially considering how broken this is.

@john-preston
Copy link
Member

@Hexawolf I don't know why this happens. Fixing PRs are welcome.

@kathampy
Copy link
Author

kathampy commented Nov 13, 2018

@john-preston It seems OpenAL Soft always virtualizes sound in a 3D space around the listener. You have to use the AL_SOFT_direct_channels extension to disable this behavior. However this drops extra channels when playing surround sources on stereo speakers instead of downmixing them so you might want to leave the default behaviour enabled when the number of speakers is lower than the number of channels.

http://openal.org/pipermail/openal/2015-February/000331.html
https://github.com/openalext/openalext/wiki/AL_SOFT_direct_channels

@john-preston
Copy link
Member

@kathampy Thanks! I'll look into that.

@john-preston
Copy link
Member

@kathampy In the description:

AL_DIRECT_CHANNELS_SOFT set to AL_TRUE indicates the audio channels are not virtualized and play directly on the matching output channels if they exist, otherwise they are dropped. Applies only when playing non-mono buffers.

I'm a bit worried about otherwise they are dropped part. Won't it happen that some systems just stop playing audio completely?

@kathampy
Copy link
Author

kathampy commented Nov 13, 2018

I'm a bit worried about otherwise they are dropped part. Won't it happen that some systems just stop playing audio completely?

No. If the source is mono, it will always be virtualized to the center channel on any speaker configuration. If the source is stereo or greater, only the source channels that have corresponding physicals speakers will play through their respective speakers. i.e. when playing a surround source on stereo speakers you'll only hear the left and right source channels and the surround source channels will be ignored. The only time this will occur is if a user shares a multi-channel AAC or Dolby / DTS file. All web content from previews are usually stereo anyway. For the rare instances where users share multi-channel files, you'll need to manually downmix it from the number of source channels to the number of speakers so that all the source channels are audible. e.g. the center source channel with speech would be inaudible on a stereo system without downmixing.

@john-preston
Copy link
Member

I'm not sure I support in-app playback of more than two channels (stereo format). So I think this should be ok.

@DJ-ZX
Copy link

DJ-ZX commented Nov 13, 2018

      I'm not sure I support in-app playback of more than two channels (stereo format). So I think this should be ok.

If needed - I can make different audio-files with channels from 1 to 8 and check direct output for dev Telegram build for each of it. Btw: will be good to know complete list of codecs supported (for ex - PCM, FLAC, OGG Vorbis, Opus, MP3, AAC, what else?) and video containers too, so I will make some video demos as well/
You can provide me build or I can wait for beta (subscribed for betas everywhere)

@DJ-ZX
Copy link

DJ-ZX commented Dec 31, 2018

Seems bug is fixed. I found that it's not reproducible anymore in 1.5.4 and 1.5.5beta.
Thank you

@stek29 stek29 closed this as completed Jan 5, 2019
foxcpp pushed a commit to foxcpp/kepka that referenced this issue Jan 7, 2019
kiku-jw pushed a commit to kiku-jw/tdesktop that referenced this issue Feb 11, 2019
leha-bot pushed a commit to procxx/kepka that referenced this issue May 24, 2019
@github-actions
Copy link

github-actions bot commented Mar 6, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests