New issue
Advanced search Search tips
Starred by 45 users
Status: Fixed
Owner:
Closed: Jul 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment
PulseAudio doesn't always use the sample rate reported by the server.
Reported by olali...@gmail.com, Apr 10 2013 Back to list
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.15 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Go to http://www.youtube.com/html5 and enable the HTML5 beta
2. Open any video on YouTube and make sure it plays using the HTML5 player
3. All voices sound like smurfs

What is the expected behavior?
All voices and sounds should sound like in any other browser / video player

What went wrong?
It sounds like the pitch is set too high when playing HTML5 audio. Flash is fine, and it works in Firefox too, both using Flash and HTML5. It doesn't sound quite like the smurfs, but the higher pitch is definitely noticable, and annoying. Especially when listening to music.

Did this work before? Yes I noticed it under a week ago, not sure about the exact version number.

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes Firefox 20

Chrome version: 27.0.1453.15  Channel: beta
OS Version: Ubuntu 12.10
 
See the comments at the end of  issue 32757 :

https://code.google.com/p/chromium/issues/detail?id=32757#c64

It looks like this happens when PulseAudio is confused about the hardware sample rate. Users have fixed this by adding a "default-sample-rate" value to /etc/pulse/daemon.conf and restarting PulseAudio.
Comment 2 by olali...@gmail.com, Apr 11 2013
It's working again now, after setting the default sample rate, as suggested in the other issue. Still worth fixing, though, as other browsers seem to handle it just fine from the beginning.

Thanks!
Cc: ranjitkan@chromium.org
Status: WontFix
Thanks for the update, Marking this as wont fix.


Labels: -Cr-Internals-Media Cr-Internals-Media-Audio
Owner: dalecur...@chromium.org
Status: Assigned
Summary: PulseAudio doesn't always use the sample rate reported by the server. (was: High pitched HTML5 audio)
Reopening since discussions with a PulseAudio maintainer have revealed that PulseAudio will not always obey the server rate.  We're investigating a tiny patch to let PulseAudio handle resampling in these cases.

If we see an influx of reports from Stable channel where adding a "default-sample-rate" value doesn't fix the problem, we'll consider merging a fix back to M27.
 Issue 242677  has been merged into this issue.
 Issue 242519  has been merged into this issue.
 Issue 240720  has been merged into this issue.
 Issue 242677  has been merged into this issue.
Comment 9 by rus...@gmail.com, May 22 2013
I tried setting the default-sample-rate to either 44100 or 48000 - either plays too fast.
 Issue 242766  has been merged into this issue.
@rushpl: Did you killall pulseaudio in between changing the setting?
 Issue 242926  has been merged into this issue.
Comment 13 by suprf...@gmail.com, May 22 2013
I'm on Ubuntu 13.04, default-sample-rate was already set to 44100 and videos had the helium voice quality, but then I changed it to 48000 to match alternate-sample-rate which was also set to 48000 and that seemed to have solved the problem.
Comment 14 by gavi...@gmail.com, May 23 2013
Using Kubuntu 13.04 & Chrome Stable 27.0.1453.93
Flash videos play audio too fast.  Changing default-sample-rate to 48000 fixed it here.
 Issue 243233  has been merged into this issue.
 Issue 243710  has been merged into this issue.
Comment 17 by rus...@gmail.com, May 24 2013
Latest chrome beta 28. I am confident I have restarted pulseaudio and I am having this issue for example on blip.tv - both HTML5 and Flash. I have set:
default-sample-rate = 44100

Project Member Comment 18 by bugdroid1@chromium.org, May 24 2013
------------------------------------------------------------------------
r202233 | dalecurtis@google.com | 2013-05-24T23:54:45.756726Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/media/audio/pulse/audio_manager_pulse.cc?r1=202233&r2=202232&pathrev=202233
   M http://src.chromium.org/viewvc/chrome/trunk/src/media/audio/pulse/pulse_util.cc?r1=202233&r2=202232&pathrev=202233
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/media/audio_renderer_mixer_manager.cc?r1=202233&r2=202232&pathrev=202233

Allow sample rate pass through on Linux.

Requiring the native output sample rate to avoid glitching appears
to have just been an issue with a poor tlength choice.  xians and
I resolved this prior to turning PulseAudio on by default, but left
the native sample rate requirement in at the time.

Since "native sample rate" can change on the fly with PulseAudio
our approach of specifying FIX_RATE was incorrect.  Allowing Pulse
to handle resampling lets us remove the FIX_RATE flag.  It also
improves CPU usage in cases where Pulse can configure the output
device to match the requested sample rate.

BUG= 229918 
TEST=extensive manual checks for glitching.
R=xians@chromium.org

Review URL: https://codereview.chromium.org/15957002
------------------------------------------------------------------------
 Issue 244393  has been merged into this issue.
Cc: msrchandra@chromium.org
 Issue 244098  has been merged into this issue.
Comment 21 by Deleted ...@, May 28 2013
Arch Linux (up to date) with Chrome 27.0.1453.93. Adding a "default-sample-rate" value didn't fix the problem.
Comment 22 Deleted
Comment 23 by rav3...@gmail.com, May 30 2013
I'm having the same problem in Chrome 27.0.1453.93 in Linux Mint 14. YouTube videos sound too fast and high pitched. So does my local news station's weather videos. Seems any flash video sounds 1.5x faster than it should be. Doing a 'pulseaudio -k' solves the problem but then it reoccurs. Also if I reboot and play a video it sounds too fast so it seems like it's doing that at boot up.
Comment 24 by rus...@gmail.com, May 30 2013
Should the dev-channel version work correctly? I am at this channel and still experiencing the problem.
Comment 25 Deleted
I am facing the opposite behavior (slow playback) and the bug has been merged to this one.

The default-sample-rate workaround works like a charm!
Comment 27 Deleted
Comment 28 by rav3...@gmail.com, May 30 2013
I tried this as mentioned before and it worked on my end too. In the terminal program:

$ sudo nano /etc/pulse/daemon.conf

In the commented areas add this: 

; Fix for sped up sound in Chrome Videos
default-sample-rate = 48000

CTRL+O then CTRL+X to save the file.

This is the work-around that worked for me.
Comment 29 by rav3...@gmail.com, May 30 2013
Also, be sure to do this after the above mentioned edit:

$ pulseaudio -k

(If your user is not in the audio group  you may have to use sudo.)
@rushpl: A dev-channel update just went out a few hours ago.  If you have 29.0.1521.3 or higher, you should have the fix.  Let me know if you still see problems there.
If you wish to avoid editing /etc/pulse/daemon.conf you can instead create/edit:
~/.pulse/daemon.conf
(in your home folder) and insert the fix mentioned above:
default-sample-rate = 48000

E.g. for making Google Chrome work you will have to quit the browser as well as running:
pulseaudio -k
and optionally call
pulseaudio --start
if pulseaudio is not starting.

The mentioned fix works with my Intel motherboard and sound:
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
I have the same problem on Ubuntu 13.04, using Chrome 27.0.1453.93 
Chromium 25.0.1364.160 Ubuntu 13.04 (25.0.1364.160-0ubuntu3) won't play any songs on Google Music at all, I just get a message "Couldn't play song. skipped ahead"

The default-sample-rate = 48000 fix didn't help

00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)

No problems in Firefox
@dalecurtis: i've been trying 29.0.1512.3, problem's still there and the default-sample-rate workaround doesn't work

Ubuntu 13.04, 32 bit
To make more unconformable the Google chrome team,* *Mr* *Leo Laporte had
that issue on air of TWiT
https://www.youtube.com/watch?v=WAif8nQxfoE&feature=player_detailpage#t=1379s;-)
Comment 35 by rus...@gmail.com, Jun 4 2013
Version 29.0.1521.3 is working correctly for me. Thank you!
Is it working on Google Music too?
Comment 37 by rus...@gmail.com, Jun 4 2013
No "The Google Play music player is currently available in select territories.". Apparently I am in some worse parts of the Internet. At least I can spend my money elsewhere. :-)
@corsiandr: I believe the Google Music issue is different, see  issue 242881 .  We haven't figured out why that problem is specific to the HTML5 Google Music experience. Does HTML5 audio work correctly elsewhere? I.e. say from the links in this comment:

https://code.google.com/p/chromium/issues/detail?id=242881#c16

@kriswierzbicki: That's not the same issue, this bug is for Linux while the device they're using in the video is a Mac. 
no you are wrog it is a dell xps 13 and after hole show Mr. Laporte says it
is linux look up
Labels: M-28 Merge-Requested
@kriswierzbicki: Ahhh, my eyesight is bad :) 

+Merge-Requested for M28 given the number of reports.
Labels: -Merge-Requested Merge-Approved
I wanted to note that the pitch problems persist after today's update to Chrome 27.0.1453.110.
The fix is currently only available on dev channel, 29.0.1521.3 or higher.  It should also show up in the next M28 beta update sometime this week.
Project Member Comment 44 by bugdroid1@chromium.org, Jun 5 2013
Labels: -Merge-Approved merge-merged-1500
------------------------------------------------------------------------
r204028 | dalecurtis@google.com | 2013-06-04T20:29:15.782288Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1500/src/content/renderer/media/audio_renderer_mixer_manager.cc?r1=204028&r2=204027&pathrev=204028
   M http://src.chromium.org/viewvc/chrome/branches/1500/src/media/audio/pulse/audio_manager_pulse.cc?r1=204028&r2=204027&pathrev=204028
   M http://src.chromium.org/viewvc/chrome/branches/1500/src/media/audio/pulse/pulse_util.cc?r1=204028&r2=204027&pathrev=204028

Merge 202233 "Allow sample rate pass through on Linux."

> Allow sample rate pass through on Linux.
> 
> Requiring the native output sample rate to avoid glitching appears
> to have just been an issue with a poor tlength choice.  xians and
> I resolved this prior to turning PulseAudio on by default, but left
> the native sample rate requirement in at the time.
> 
> Since "native sample rate" can change on the fly with PulseAudio
> our approach of specifying FIX_RATE was incorrect.  Allowing Pulse
> to handle resampling lets us remove the FIX_RATE flag.  It also
> improves CPU usage in cases where Pulse can configure the output
> device to match the requested sample rate.
> 
> BUG= 229918 
> TEST=extensive manual checks for glitching.
> R=xians@chromium.org
> 
> Review URL: https://codereview.chromium.org/15957002

TBR=dalecurtis@google.com

Review URL: https://codereview.chromium.org/16348003
------------------------------------------------------------------------
@dalecurtis: HTML5 works flawlessly everywhere except for google music.
I move to the specific google music issue.
Comment 46 by gavi...@gmail.com, Jun 6 2013
Installed the latest beta 28.0.1500.36 
Removed the default-sample-rate line from daemon.conf
pulseaudio -k

Audio is now working perfectly with this version.
I have beta 28.0.1500.36 and was receiving this issue.  So I did the default-sample-rate = 48000 and it has fixed my issue.
 Issue 251270  has been merged into this issue.
Comment 49 by Deleted ...@, Jul 3 2013
I installed the dev version 29.0.1547.0 and it did not fix the problem.

I also added the default-sample-rate line in daemon.conf and it did not fix the problem.

I'm running Crunchbang wardolf, that might have something to do with it?
Status: Fixed
There shouldn't be anymore issues with PulseAudio in M28. I'm not sure what audio stack Crunchbang wardolf is using, but you might try --audio-buffer-size=2048.
Comment 51 by bruno...@gmail.com, Aug 21 2013
Chromium 29.0.1547.57 (217859)   not fix problem.

Pulseaudio 4.0-2

Fragments match Hardware buffer of Intel HDA  Sigmatel 
 default-fragments = 2
 default-fragment-size-msec = 115

Comment 52 by mbi...@gmail.com, Aug 23 2013
Crazy stuff: I happened to have open the russian test site:

http://www.russianlessons.net/audio/audio-test.php

and right after it, Google Music. It seemed, Chrome Version 30.0.1599.14 beta picked up the sample rate from the russian test audio for ALL HTML5 audio. Playing a song in Google Music the audio was pitched DOWN, i.e. like a record playing too slow.

After closing the tab with the audio test page, closing Chrome and reopening, Google Music played fine and now the audio on that test page is chipmunk-style, i.e. too fast. At least the first sample.

Sign in to add a comment