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

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

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 std::wstring program; 223 std::wstring program;
224 std::string argument; 224 std::string argument;
225 if (!CoreAudioUtil::IsSupported()) { 225 if (!CoreAudioUtil::IsSupported()) {
226 program = L"sndvol32.exe"; 226 program = L"sndvol32.exe";
227 argument = "-R"; 227 argument = "-R";
228 } else { 228 } else {
229 program = L"control.exe"; 229 program = L"control.exe";
230 argument = "mmsys.cpl,,1"; 230 argument = "mmsys.cpl,,1";
231 } 231 }
232 232
233 FilePath path; 233 base::FilePath path;
234 PathService::Get(base::DIR_SYSTEM, &path); 234 PathService::Get(base::DIR_SYSTEM, &path);
235 path = path.Append(program); 235 path = path.Append(program);
236 CommandLine command_line(path); 236 CommandLine command_line(path);
237 command_line.AppendArg(argument); 237 command_line.AppendArg(argument);
238 base::LaunchProcess(command_line, base::LaunchOptions(), NULL); 238 base::LaunchProcess(command_line, base::LaunchOptions(), NULL);
239 } 239 }
240 240
241 void AudioManagerWin::GetAudioInputDeviceNames( 241 void AudioManagerWin::GetAudioInputDeviceNames(
242 media::AudioDeviceNames* device_names) { 242 media::AudioDeviceNames* device_names) {
243 DCHECK(enumeration_type() != kUninitializedEnumeration); 243 DCHECK(enumeration_type() != kUninitializedEnumeration);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 channel_layout = WASAPIAudioOutputStream::HardwareChannelLayout(); 371 channel_layout = WASAPIAudioOutputStream::HardwareChannelLayout();
372 } 372 }
373 373
374 // TODO(dalecurtis): This should include hardware bits per channel eventually. 374 // TODO(dalecurtis): This should include hardware bits per channel eventually.
375 return AudioParameters( 375 return AudioParameters(
376 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, 376 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
377 sample_rate, bits_per_sample, GetAudioHardwareBufferSize()); 377 sample_rate, bits_per_sample, GetAudioHardwareBufferSize());
378 } 378 }
379 379
380 } // namespace media 380 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_output_win_unittest.cc ('k') | media/audio/win/audio_unified_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698