| 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_WIN_WAVEIN_INPUT_WIN_H_ | 5 #ifndef MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
| 6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 10 #include <windows.h> | 8 #include <windows.h> |
| 11 #include <mmsystem.h> | 9 #include <mmsystem.h> |
| 12 #include <stdint.h> | 10 #include <stdint.h> |
| 13 | 11 |
| 12 #include <memory> |
| 13 #include <string> |
| 14 |
| 14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
| 18 #include "base/win/scoped_handle.h" | 19 #include "base/win/scoped_handle.h" |
| 19 #include "media/audio/audio_io.h" | 20 #include "media/audio/audio_io.h" |
| 20 #include "media/base/audio_parameters.h" | 21 #include "media/base/audio_parameters.h" |
| 21 | 22 |
| 22 namespace media { | 23 namespace media { |
| 23 | 24 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 WAVEHDR* buffer_; | 122 WAVEHDR* buffer_; |
| 122 | 123 |
| 123 // An event that is signaled when the callback thread is ready to stop. | 124 // An event that is signaled when the callback thread is ready to stop. |
| 124 base::win::ScopedHandle stopped_event_; | 125 base::win::ScopedHandle stopped_event_; |
| 125 | 126 |
| 126 // Lock used to avoid conflicts when Stop() is called during a callback. | 127 // Lock used to avoid conflicts when Stop() is called during a callback. |
| 127 base::Lock lock_; | 128 base::Lock lock_; |
| 128 | 129 |
| 129 // Extra audio bus used for storage of deinterleaved data for the OnData | 130 // Extra audio bus used for storage of deinterleaved data for the OnData |
| 130 // callback. | 131 // callback. |
| 131 scoped_ptr<media::AudioBus> audio_bus_; | 132 std::unique_ptr<media::AudioBus> audio_bus_; |
| 132 | 133 |
| 133 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); | 134 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 } // namespace media | 137 } // namespace media |
| 137 | 138 |
| 138 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 139 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
| OLD | NEW |