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 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
7 | 7 |
8 #include <AudioToolbox/AudioFormat.h> | 8 #include <AudioToolbox/AudioFormat.h> |
9 #include <AudioToolbox/AudioQueue.h> | 9 #include <AudioToolbox/AudioQueue.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
| 12 #include <memory> |
| 13 |
12 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
13 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 16 #include "base/macros.h" |
15 #include "base/time/time.h" | 17 #include "base/time/time.h" |
16 #include "media/audio/audio_io.h" | 18 #include "media/audio/audio_io.h" |
17 #include "media/base/audio_parameters.h" | 19 #include "media/base/audio_parameters.h" |
18 | 20 |
19 namespace media { | 21 namespace media { |
20 | 22 |
21 class AudioBus; | 23 class AudioBus; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 AudioQueueRef audio_queue_; | 82 AudioQueueRef audio_queue_; |
81 // Size of each of the buffers in |audio_buffers_| | 83 // Size of each of the buffers in |audio_buffers_| |
82 uint32_t buffer_size_bytes_; | 84 uint32_t buffer_size_bytes_; |
83 // True iff Start() has been called successfully. | 85 // True iff Start() has been called successfully. |
84 bool started_; | 86 bool started_; |
85 // Used to determine if we need to slow down |callback_| calls. | 87 // Used to determine if we need to slow down |callback_| calls. |
86 base::TimeTicks last_fill_; | 88 base::TimeTicks last_fill_; |
87 // Used to defer Start() to workaround http://crbug.com/160920. | 89 // Used to defer Start() to workaround http://crbug.com/160920. |
88 base::CancelableClosure deferred_start_cb_; | 90 base::CancelableClosure deferred_start_cb_; |
89 | 91 |
90 scoped_ptr<media::AudioBus> audio_bus_; | 92 std::unique_ptr<media::AudioBus> audio_bus_; |
91 | 93 |
92 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); | 94 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); |
93 }; | 95 }; |
94 | 96 |
95 } // namespace media | 97 } // namespace media |
96 | 98 |
97 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 99 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
OLD | NEW |