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

Side by Side Diff: media/audio/win/audio_manager_win.cc

Issue 10535117: Revert 141476 - Do not stop audio physical stream immediately after logical one had stopped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/audio/win/audio_output_win_unittest.cc » ('j') | 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 #include "media/audio/audio_io.h" 5 #include "media/audio/audio_io.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <objbase.h> // This has to be before initguid.h 8 #include <objbase.h> // This has to be before initguid.h
9 #include <initguid.h> 9 #include <initguid.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 // Factory for the implementations of AudioOutputStream for AUDIO_PCM_LINEAR 238 // Factory for the implementations of AudioOutputStream for AUDIO_PCM_LINEAR
239 // mode. 239 // mode.
240 // - PCMWaveOutAudioOutputStream: Based on the waveOut API. 240 // - PCMWaveOutAudioOutputStream: Based on the waveOut API.
241 AudioOutputStream* AudioManagerWin::MakeLinearOutputStream( 241 AudioOutputStream* AudioManagerWin::MakeLinearOutputStream(
242 const AudioParameters& params) { 242 const AudioParameters& params) {
243 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); 243 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
244 if (params.channels() > kWinMaxChannels) 244 if (params.channels() > kWinMaxChannels)
245 return NULL; 245 return NULL;
246 246
247 return new PCMWaveOutAudioOutputStream(this, 247 return new PCMWaveOutAudioOutputStream(this, params, 3, WAVE_MAPPER);
248 params,
249 media::NumberOfWaveOutBuffers(),
250 WAVE_MAPPER);
251 } 248 }
252 249
253 // Factory for the implementations of AudioOutputStream for 250 // Factory for the implementations of AudioOutputStream for
254 // AUDIO_PCM_LOW_LATENCY mode. Two implementations should suffice most 251 // AUDIO_PCM_LOW_LATENCY mode. Two implementations should suffice most
255 // windows user's needs. 252 // windows user's needs.
256 // - PCMWaveOutAudioOutputStream: Based on the waveOut API. 253 // - PCMWaveOutAudioOutputStream: Based on the waveOut API.
257 // - WASAPIAudioOutputStream: Based on Core Audio (WASAPI) API. 254 // - WASAPIAudioOutputStream: Based on Core Audio (WASAPI) API.
258 AudioOutputStream* AudioManagerWin::MakeLowLatencyOutputStream( 255 AudioOutputStream* AudioManagerWin::MakeLowLatencyOutputStream(
259 const AudioParameters& params) { 256 const AudioParameters& params) {
260 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); 257 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, 314 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers,
318 xp_device_id); 315 xp_device_id);
319 } 316 }
320 317
321 /// static 318 /// static
322 AudioManager* CreateAudioManager() { 319 AudioManager* CreateAudioManager() {
323 return new AudioManagerWin(); 320 return new AudioManagerWin();
324 } 321 }
325 322
326 } // namespace media 323 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/audio/win/audio_output_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698