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

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

Issue 2538793002: Log audio system used to WebRTC log. (Closed)
Patch Set: Code review. Created 4 years 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/audio_manager_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 #include "media/audio/win/audio_manager_win.h" 5 #include "media/audio/win/audio_manager_win.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 std::string AudioManagerWin::GetAssociatedOutputDeviceID( 324 std::string AudioManagerWin::GetAssociatedOutputDeviceID(
325 const std::string& input_device_id) { 325 const std::string& input_device_id) {
326 if (!core_audio_supported()) { 326 if (!core_audio_supported()) {
327 NOTIMPLEMENTED() 327 NOTIMPLEMENTED()
328 << "GetAssociatedOutputDeviceID is not supported on this OS"; 328 << "GetAssociatedOutputDeviceID is not supported on this OS";
329 return std::string(); 329 return std::string();
330 } 330 }
331 return CoreAudioUtil::GetMatchingOutputDeviceID(input_device_id); 331 return CoreAudioUtil::GetMatchingOutputDeviceID(input_device_id);
332 } 332 }
333 333
334 const char* AudioManagerWin::GetName() {
335 return "Windows";
336 }
337
334 // Factory for the implementations of AudioOutputStream for AUDIO_PCM_LINEAR 338 // Factory for the implementations of AudioOutputStream for AUDIO_PCM_LINEAR
335 // mode. 339 // mode.
336 // - PCMWaveOutAudioOutputStream: Based on the waveOut API. 340 // - PCMWaveOutAudioOutputStream: Based on the waveOut API.
337 AudioOutputStream* AudioManagerWin::MakeLinearOutputStream( 341 AudioOutputStream* AudioManagerWin::MakeLinearOutputStream(
338 const AudioParameters& params, 342 const AudioParameters& params,
339 const LogCallback& log_callback) { 343 const LogCallback& log_callback) {
340 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); 344 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
341 if (params.channels() > kWinMaxChannels) 345 if (params.channels() > kWinMaxChannels)
342 return NULL; 346 return NULL;
343 347
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 ScopedAudioManagerPtr CreateAudioManager( 546 ScopedAudioManagerPtr CreateAudioManager(
543 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 547 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
544 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, 548 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
545 AudioLogFactory* audio_log_factory) { 549 AudioLogFactory* audio_log_factory) {
546 return ScopedAudioManagerPtr( 550 return ScopedAudioManagerPtr(
547 new AudioManagerWin(std::move(task_runner), std::move(worker_task_runner), 551 new AudioManagerWin(std::move(task_runner), std::move(worker_task_runner),
548 audio_log_factory)); 552 audio_log_factory));
549 } 553 }
550 554
551 } // namespace media 555 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_manager_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698