Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Issue 12328097: Always fully fill PulseAudio's requested buffer. Allow larger initial requests. (Closed)

Created:
7 years, 10 months ago by DaleCurtis
Modified:
7 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Always fully fill PulseAudio's requested buffer. Allow larger initial requests. Instead of forcing PulseAudio to always call us with a buffer size matching our requested size, let it automatically choose its initial buffers and only ask for our requested size in steady state. Doing this requires using a WaitTillDataReady() for those times when we need to fill a larger buffer than we expect. BUG=32757 NOTRY=true TEST=no more PulseAudio glitching when using native sample rate. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=185593

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comments. #

Total comments: 4

Patch Set 3 : Fixes. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -41 lines) Patch
M media/audio/pulse/pulse_output.cc View 1 2 5 chunks +37 lines, -41 lines 3 comments Download

Messages

Total messages: 15 (0 generated)
DaleCurtis
It's possible this will lead to some CHECK() failures from pa_stream_begin_write(), but I'd rather see ...
7 years, 9 months ago (2013-02-27 22:01:59 UTC) #1
scherkus (not reviewing)
I'm not sure I'm really qualified to review pulse stuff -- hint: that means you ...
7 years, 9 months ago (2013-02-28 01:20:13 UTC) #2
DaleCurtis
Sorry this is the outcome of the discussion on https://codereview.chromium.org/12328084/
7 years, 9 months ago (2013-02-28 01:27:36 UTC) #3
DaleCurtis
https://codereview.chromium.org/12374005/ to fix the scherkus-stamp issue :) https://codereview.chromium.org/12328097/diff/1/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/12328097/diff/1/media/audio/pulse/pulse_output.cc#newcode156 media/audio/pulse/pulse_output.cc:156: // Tell ...
7 years, 9 months ago (2013-02-28 01:41:15 UTC) #4
DaleCurtis
-scherkus now that xians can approve! Feel free to CQ it STO time if you ...
7 years, 9 months ago (2013-02-28 01:57:02 UTC) #5
no longer working on chromium
Hey Dale, just some questions. https://codereview.chromium.org/12328097/diff/6001/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/12328097/diff/6001/media/audio/pulse/pulse_output.cc#newcode164 media/audio/pulse/pulse_output.cc:164: pa_buffer_attributes.fragsize = static_cast<uint32_t>(-1); by ...
7 years, 9 months ago (2013-02-28 08:56:09 UTC) #6
DaleCurtis
https://codereview.chromium.org/12328097/diff/6001/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/12328097/diff/6001/media/audio/pulse/pulse_output.cc#newcode164 media/audio/pulse/pulse_output.cc:164: pa_buffer_attributes.fragsize = static_cast<uint32_t>(-1); On 2013/02/28 08:56:09, xians1 wrote: > ...
7 years, 9 months ago (2013-03-01 00:08:17 UTC) #7
no longer working on chromium
I tried this CL, together with my CL https://codereview.chromium.org/12316131/(which provides the native sample rate), it ...
7 years, 9 months ago (2013-03-01 16:53:58 UTC) #8
DaleCurtis
Make sure you restart pulse before testing. After fiddling with settings for a while I've ...
7 years, 9 months ago (2013-03-01 17:43:55 UTC) #9
DaleCurtis
(also you need to patch AudioManagerLinux and AudioRendererMixerManager to not pass through the input sample ...
7 years, 9 months ago (2013-03-01 19:20:16 UTC) #10
DaleCurtis
(everything sounds good to me :)
7 years, 9 months ago (2013-03-01 19:22:02 UTC) #11
no longer working on chromium
great. thanks for the verification. lgtm. https://codereview.chromium.org/12328097/diff/4003/media/audio/pulse/pulse_output.cc File media/audio/pulse/pulse_output.cc (right): https://codereview.chromium.org/12328097/diff/4003/media/audio/pulse/pulse_output.cc#newcode316 media/audio/pulse/pulse_output.cc:316: // Set |source_callback_| ...
7 years, 9 months ago (2013-03-01 20:44:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/12328097/4003
7 years, 9 months ago (2013-03-01 21:05:55 UTC) #13
commit-bot: I haz the power
Change committed as 185593
7 years, 9 months ago (2013-03-01 21:06:12 UTC) #14
Sam Edwards
7 years, 7 months ago (2013-05-22 23:25:03 UTC) #15
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/12328097/diff/4003/media/audio/pulse/p...
File media/audio/pulse/pulse_output.cc (right):

https://chromiumcodereview.appspot.com/12328097/diff/4003/media/audio/pulse/p...
media/audio/pulse/pulse_output.cc:176: PA_STREAM_FIX_RATE |
PA_STREAM_INTERPOLATE_TIMING |
All,

I realize I'm a bit late to the party here (as of this writing, this code has
been moved to pulse_util.cc) but PA_STREAM_FIX_RATE is improper here. This
forces the stream's sample rate to match the sink's sample rate, which isn't
necessarily the same as info->sample_spec.rate.

When this happens, PulseAudio begins playing back the audio at an improper
sample rate, leading to e.g.
https://code.google.com/p/webrtc/issues/detail?id=1587

Thanks,
Sam

Powered by Google App Engine
This is Rietveld 408576698