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

Side by Side Diff: media/audio/win/waveout_output_win.h

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/win/wavein_input_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WAVEOUT_OUTPUT_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
6 #define MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ 6 #define MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <mmsystem.h> 9 #include <mmsystem.h>
10 #include <mmreg.h> 10 #include <mmreg.h>
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 #include <memory>
15
14 #include "base/macros.h" 16 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "base/win/scoped_handle.h" 18 #include "base/win/scoped_handle.h"
18 #include "media/audio/audio_io.h" 19 #include "media/audio/audio_io.h"
19 #include "media/base/audio_parameters.h" 20 #include "media/base/audio_parameters.h"
20 21
21 namespace media { 22 namespace media {
22 23
23 class AudioManagerWin; 24 class AudioManagerWin;
24 25
25 // Implements PCM audio output support for Windows using the WaveXXX API. 26 // Implements PCM audio output support for Windows using the WaveXXX API.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 HWAVEOUT waveout_; 121 HWAVEOUT waveout_;
121 122
122 // Handle to the buffer event. 123 // Handle to the buffer event.
123 base::win::ScopedHandle buffer_event_; 124 base::win::ScopedHandle buffer_event_;
124 125
125 // Handle returned by RegisterWaitForSingleObject(). 126 // Handle returned by RegisterWaitForSingleObject().
126 HANDLE waiting_handle_; 127 HANDLE waiting_handle_;
127 128
128 // Pointer to the allocated audio buffers, we allocate all buffers in one big 129 // Pointer to the allocated audio buffers, we allocate all buffers in one big
129 // chunk. This object owns them. 130 // chunk. This object owns them.
130 scoped_ptr<char[]> buffers_; 131 std::unique_ptr<char[]> buffers_;
131 132
132 // Lock used to avoid the conflict when callbacks are called simultaneously. 133 // Lock used to avoid the conflict when callbacks are called simultaneously.
133 base::Lock lock_; 134 base::Lock lock_;
134 135
135 // Container for retrieving data from AudioSourceCallback::OnMoreData(). 136 // Container for retrieving data from AudioSourceCallback::OnMoreData().
136 scoped_ptr<AudioBus> audio_bus_; 137 std::unique_ptr<AudioBus> audio_bus_;
137 138
138 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream); 139 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream);
139 }; 140 };
140 141
141 } // namespace media 142 } // namespace media
142 143
143 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ 144 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/wavein_input_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698