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

Issue 6949009: Add support for real-time audio threads. (Closed)

Created:
9 years, 7 months ago by Chris Rogers
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, jam, brettw-cc_chromium.org
Visibility:
Public.

Description

Add support for real-time audio threads. BUG=none TEST=none (tested locally on Mac OS X) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85663

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : '' #

Total comments: 5

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -3 lines) Patch
M base/threading/platform_thread.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M base/threading/platform_thread_mac.mm View 1 2 3 3 chunks +103 lines, -1 line 0 comments Download
M base/threading/platform_thread_posix.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M base/threading/platform_thread_win.cc View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M base/threading/simple_thread.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/audio_device.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
Chris Rogers
For now, I'm leaving the Windows and Linux versions unimplemented. On Mac OS X, I've ...
9 years, 7 months ago (2011-05-06 22:15:29 UTC) #1
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/6949009/diff/1/base/threading/platform_thread.h File base/threading/platform_thread.h (right): http://codereview.chromium.org/6949009/diff/1/base/threading/platform_thread.h#newcode96 base/threading/platform_thread.h:96: static void EnableRealtimeAudioPerformance(PlatformThreadHandle handle); An audio-specific method seems out ...
9 years, 7 months ago (2011-05-09 22:28:14 UTC) #2
Chris Rogers
I wanted to avoid defining a cross-platform interface where I would be passing time constraint ...
9 years, 7 months ago (2011-05-09 22:40:49 UTC) #3
Ken Russell (switch to Gerrit)
On 2011/05/09 22:40:49, Chris Rogers wrote: > I wanted to avoid defining a cross-platform interface ...
9 years, 7 months ago (2011-05-10 18:04:56 UTC) #4
Chris Rogers
What values would you suggest for the enum? kThreadPriority_Low kThreadPriority_Normal kThreadPriority_High kThreadPriority_RealtimeAudio I'm guessing we ...
9 years, 7 months ago (2011-05-10 18:46:09 UTC) #5
Ken Russell (switch to Gerrit)
On 2011/05/10 18:46:09, Chris Rogers wrote: > What values would you suggest for the enum? ...
9 years, 7 months ago (2011-05-10 19:43:11 UTC) #6
Chris Rogers
I've taken your suggestions and changed this to a SetThreadPriority() method with an enum.
9 years, 7 months ago (2011-05-10 22:04:56 UTC) #7
Ken Russell (switch to Gerrit)
LGTM
9 years, 7 months ago (2011-05-11 21:28:24 UTC) #8
Chris Rogers
Brett could you please do an OWNERS review?
9 years, 7 months ago (2011-05-11 21:42:38 UTC) #9
brettw
http://codereview.chromium.org/6949009/diff/9001/base/threading/platform_thread_mac.mm File base/threading/platform_thread_mac.mm (right): http://codereview.chromium.org/6949009/diff/9001/base/threading/platform_thread_mac.mm#newcode79 base/threading/platform_thread_mac.mm:79: policy.timeshare = 0; // set to 1 for a ...
9 years, 7 months ago (2011-05-12 22:26:03 UTC) #10
Chris Rogers
Brett, thanks for looking at this. I'm assuming that NOTIMPLEMENTED will do nothing worse than ...
9 years, 7 months ago (2011-05-12 23:01:55 UTC) #11
brettw
Thanks, LGTM. Yes, NOTIMPLEMENTED logs a special message. http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread_mac.mm File base/threading/platform_thread_mac.mm (right): http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread_mac.mm#newcode138 base/threading/platform_thread_mac.mm:138: } ...
9 years, 7 months ago (2011-05-13 05:14:22 UTC) #12
darin (slow to review)
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h File base/threading/platform_thread.h (right): http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h#newcode54 base/threading/platform_thread.h:54: kThreadPriority_RealtimeAudio isn't it a bit unfortunate for base to ...
9 years, 7 months ago (2011-05-13 17:51:12 UTC) #13
Chris Rogers
On 2011/05/13 17:51:12, darin wrote: > http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h > File base/threading/platform_thread.h (right): > > http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h#newcode54 > ...
9 years, 7 months ago (2011-05-13 19:23:40 UTC) #14
scherkus (not reviewing)
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h File base/threading/platform_thread.h (right): http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h#newcode54 base/threading/platform_thread.h:54: kThreadPriority_RealtimeAudio On 2011/05/13 17:51:12, darin wrote: > isn't it ...
9 years, 7 months ago (2011-05-13 23:06:49 UTC) #15
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h File base/threading/platform_thread.h (right): http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thread.h#newcode54 base/threading/platform_thread.h:54: kThreadPriority_RealtimeAudio On 2011/05/13 23:06:49, scherkus wrote: > On 2011/05/13 ...
9 years, 7 months ago (2011-05-13 23:11:01 UTC) #16
Chris Rogers
9 years, 7 months ago (2011-05-13 23:43:52 UTC) #17
Hi Andrew,

I added a warning comment as you suggest.

On 2011/05/13 23:06:49, scherkus wrote:
>
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thr...
> File base/threading/platform_thread.h (right):
> 
>
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thr...
> base/threading/platform_thread.h:54: kThreadPriority_RealtimeAudio
> On 2011/05/13 17:51:12, darin wrote:
> > isn't it a bit unfortunate for base to have to know about the concept of
> > real-time audio???
> > 
> > isn't there maybe some better way to parameterize this so that a consumer
> could
> > use PlatformThread APIs to construct a thread suitable for real-time audio?
> > 
> 
> I don't want to bikeshed this anymore, but what about Normal and High?
> 
> ...and if setting between high/normal doesn't make sense you *could* go all
the
> way with just having a "IncreaseThreadPriority()" method
> 
>
http://codereview.chromium.org/6949009/diff/15001/base/threading/platform_thr...
> base/threading/platform_thread.h:101: static void
> SetThreadPriority(PlatformThreadHandle handle,
> could we get a comment + disclaimer here warning people not to carelessly bump
> up the thread priority?
> 
> I think I linked you to the discussion before on chromium-dev:
>
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thre...

Powered by Google App Engine
This is Rietveld 408576698