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

Issue 2978005: Fixed ended event when playing audio on linux. (Closed)

Created:
10 years, 5 months ago by Sergey Ulanov
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., scherkus (not reviewing), fbarchard, awong, Alpha Left Google
Visibility:
Public.

Description

Fixed ended event when playing audio on linux. AudioRendererBase::FillBuffers() sends ended event only when playback_delay == 0, but with ALSA output the delay was never set to 0 because it includes hardware delay. Changed ALSA output to include only internal buffers in the delay value: this matches windows and mac versions. BUG=45074 TEST=<audio> fires ended event when necessary Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52407

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -43 lines) Patch
M media/audio/linux/alsa_output.h View 1 chunk +0 lines, -1 line 0 comments Download
M media/audio/linux/alsa_output.cc View 3 chunks +2 lines, -25 lines 0 comments Download
M media/audio/linux/alsa_output_unittest.cc View 4 chunks +1 line, -17 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Sergey Ulanov
Here I removed calls to snd_pcm_delay() from the alsa output and so now the delay ...
10 years, 5 months ago (2010-07-13 20:12:10 UTC) #1
awong
...okay, the specific change makes sense, but I don't know if I agree with removing ...
10 years, 5 months ago (2010-07-14 19:43:41 UTC) #2
Sergey Ulanov
On 2010/07/14 19:43:41, awong wrote: > ...okay, the specific change makes sense, but I don't ...
10 years, 5 months ago (2010-07-14 21:26:27 UTC) #3
awong
10 years, 5 months ago (2010-07-14 21:32:15 UTC) #4
LGTM

Can you create a new bug about how to deal with device delay?

On Wed, Jul 14, 2010 at 2:26 PM, <sergeyu@chromium.org> wrote:

> On 2010/07/14 19:43:41, awong wrote:
>
>> ...okay, the specific change makes sense, but I don't know if I agree with
>> removing the pcm delay check.
>>
>
>  Can you add more explanation into the CR description for how this exactly
>>
> fixes
>
>> what it's fixing? That's important because it's put into the changelog,
>> and
>>
> it's
>
>> non-obvious from the change why we're removing this.
>>
> Added more detail on how the bug is fixed.
>
>
>  As for whether we should remove the snd_pcm_delay, have you tested this on
>> a
>>
> USB
>
>> audio device?  I think that's where we might actually see real delays.
>>
>
> I didn't try it, and I agree that it may be a problem with some devices.
> Currently this problem exists on all platforms, and needs to be solved on
> all of
> them.
>
>
>
>  -Albert
>>
>
> http://codereview.chromium.org/2978005/show
>

Powered by Google App Engine
This is Rietveld 408576698