OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/audio/audio_output_device.h" | 5 #include "media/audio/audio_output_device.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
11 #include "base/time.h" | 11 #include "base/time/time.h" |
12 #include "media/audio/audio_output_controller.h" | 12 #include "media/audio/audio_output_controller.h" |
13 #include "media/audio/audio_util.h" | 13 #include "media/audio/audio_util.h" |
14 #include "media/audio/shared_memory_util.h" | 14 #include "media/audio/shared_memory_util.h" |
15 #include "media/base/limits.h" | 15 #include "media/base/limits.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 // Takes care of invoking the render callback on the audio thread. | 19 // Takes care of invoking the render callback on the audio thread. |
20 // An instance of this class is created for each capture stream in | 20 // An instance of this class is created for each capture stream in |
21 // OnStreamCreated(). | 21 // OnStreamCreated(). |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 // TODO(dalecurtis): Technically this is not always correct. Due to channel | 343 // TODO(dalecurtis): Technically this is not always correct. Due to channel |
344 // padding for alignment, there may be more data available than this. We're | 344 // padding for alignment, there may be more data available than this. We're |
345 // relying on AudioSyncReader::Read() to parse this with that in mind. Rename | 345 // relying on AudioSyncReader::Read() to parse this with that in mind. Rename |
346 // these methods to Set/GetActualFrameCount(). | 346 // these methods to Set/GetActualFrameCount(). |
347 SetActualDataSizeInBytes( | 347 SetActualDataSizeInBytes( |
348 &shared_memory_, memory_length_, | 348 &shared_memory_, memory_length_, |
349 num_frames * sizeof(*output_bus_->channel(0)) * output_bus_->channels()); | 349 num_frames * sizeof(*output_bus_->channel(0)) * output_bus_->channels()); |
350 } | 350 } |
351 | 351 |
352 } // namespace media. | 352 } // namespace media. |
OLD | NEW |