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

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

Issue 12049070: Avoids irregular OnMoreData callbacks on Windows using Core Audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed audio glitch at startup Created 7 years, 10 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 | Annotate | Revision Log
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_AUDIO_UNIFIED_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_
6 #define MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ 6 #define MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_
7 7
8 #include <Audioclient.h> 8 #include <Audioclient.h>
9 #include <MMDeviceAPI.h> 9 #include <MMDeviceAPI.h>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 scoped_ptr<base::DelegateSimpleThread> audio_io_thread_; 110 scoped_ptr<base::DelegateSimpleThread> audio_io_thread_;
111 111
112 // Contains the desired audio format which is set up at construction. 112 // Contains the desired audio format which is set up at construction.
113 // Extended PCM waveform format structure based on WAVEFORMATEXTENSIBLE. 113 // Extended PCM waveform format structure based on WAVEFORMATEXTENSIBLE.
114 // Use this for multiple channel and hi-resolution PCM data. 114 // Use this for multiple channel and hi-resolution PCM data.
115 WAVEFORMATPCMEX format_; 115 WAVEFORMATPCMEX format_;
116 116
117 // True when successfully opened. 117 // True when successfully opened.
118 bool opened_; 118 bool opened_;
119 119
120 // Volume level from 0 to 1.
121 float volume_;
tommi (sloooow) - chröme 2013/02/01 11:57:53 use double
henrika (OOO until Aug 14) 2013/02/01 12:23:52 Done.
122
120 // Size in bytes of each audio frame (4 bytes for 16-bit stereo PCM). 123 // Size in bytes of each audio frame (4 bytes for 16-bit stereo PCM).
121 size_t frame_size_; 124 size_t frame_size_;
122 125
123 // Size in audio frames of each audio packet where an audio packet 126 // Size in audio frames of each audio packet where an audio packet
124 // is defined as the block of data which the source is expected to deliver 127 // is defined as the block of data which the source is expected to deliver
125 // in each OnMoreIOData() callback. 128 // in each OnMoreIOData() callback.
126 size_t packet_size_frames_; 129 size_t packet_size_frames_;
127 130
128 // Length of the audio endpoint buffer. 131 // Length of the audio endpoint buffer.
129 size_t endpoint_render_buffer_size_frames_; 132 size_t endpoint_render_buffer_size_frames_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 173
171 // Container for sending data to AudioSourceCallback::OnMoreIOData(). 174 // Container for sending data to AudioSourceCallback::OnMoreIOData().
172 scoped_ptr<AudioBus> capture_bus_; 175 scoped_ptr<AudioBus> capture_bus_;
173 176
174 DISALLOW_COPY_AND_ASSIGN(WASAPIUnifiedStream); 177 DISALLOW_COPY_AND_ASSIGN(WASAPIUnifiedStream);
175 }; 178 };
176 179
177 } // namespace media 180 } // namespace media
178 181
179 #endif // MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ 182 #endif // MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698