OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "media/audio/shared_mem_synchronizer.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "base/memory/scoped_ptr.h" | |
9 | |
10 SharedMemSynchronizer::SharedMemSynchronizer() {} | |
11 | |
12 SharedMemSynchronizer::WaitForMultiple::WaitForMultiple( | |
13 const SynchronizerVector* synchronizers) | |
14 : synchronizers_(synchronizers), last_(synchronizers_->size() - 1) { | |
Ami GONE FROM CHROMIUM
2012/03/13 20:08:02
Why init last_ (an unsigned type) to the result of
tommi (sloooow) - chröme
2012/03/14 13:32:43
Done.
| |
15 DCHECK_GT(synchronizers_->size(), 0U); | |
Ami GONE FROM CHROMIUM
2012/03/13 20:08:02
clearer as
DCHECK(!synchronizers_->empty());
tommi (sloooow) - chröme
2012/03/14 13:32:43
Done.
| |
16 } | |
17 | |
18 int SharedMemSynchronizer::WaitForMultiple::Wait() { | |
19 int ret = WaitMultiple(*synchronizers_, last_); | |
20 last_ = static_cast<size_t>(ret); | |
21 return ret; | |
22 } | |
23 | |
24 void SharedMemSynchronizer::WaitForMultiple::Reset( | |
25 const SynchronizerVector* synchronizers) { | |
26 synchronizers_ = synchronizers; | |
27 DCHECK_GT(synchronizers_->size(), 0U); | |
Ami GONE FROM CHROMIUM
2012/03/13 20:08:02
ditto
Ami GONE FROM CHROMIUM
2012/03/13 20:08:02
reset next_start_offset_ (nee last_)?
tommi (sloooow) - chröme
2012/03/14 13:32:43
Done.
tommi (sloooow) - chröme
2012/03/14 13:32:43
Done.
| |
28 } | |
OLD | NEW |