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

Side by Side Diff: media/audio/android/audio_manager_android.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/android/audio_manager_android.h ('k') | media/audio/audio_manager.h » ('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/android/audio_manager_android.h" 5 #include "media/audio/android/audio_manager_android.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/context_utils.h" 8 #include "base/android/context_utils.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 int user_buffer_size = GetUserBufferSize(); 154 int user_buffer_size = GetUserBufferSize();
155 if (user_buffer_size) 155 if (user_buffer_size)
156 buffer_size = user_buffer_size; 156 buffer_size = user_buffer_size;
157 157
158 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, 158 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
159 GetNativeOutputSampleRate(), 16, buffer_size); 159 GetNativeOutputSampleRate(), 16, buffer_size);
160 params.set_effects(effects); 160 params.set_effects(effects);
161 return params; 161 return params;
162 } 162 }
163 163
164 const char* AudioManagerAndroid::GetName() {
165 return "Android";
166 }
167
164 AudioOutputStream* AudioManagerAndroid::MakeAudioOutputStream( 168 AudioOutputStream* AudioManagerAndroid::MakeAudioOutputStream(
165 const AudioParameters& params, 169 const AudioParameters& params,
166 const std::string& device_id, 170 const std::string& device_id,
167 const LogCallback& log_callback) { 171 const LogCallback& log_callback) {
168 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 172 DCHECK(GetTaskRunner()->BelongsToCurrentThread());
169 AudioOutputStream* stream = AudioManagerBase::MakeAudioOutputStream( 173 AudioOutputStream* stream = AudioManagerBase::MakeAudioOutputStream(
170 params, std::string(), AudioManager::LogCallback()); 174 params, std::string(), AudioManager::LogCallback());
171 if (stream) 175 if (stream)
172 streams_.insert(static_cast<OpenSLESOutputStream*>(stream)); 176 streams_.insert(static_cast<OpenSLESOutputStream*>(stream));
173 return stream; 177 return stream;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 output_volume_override_ = volume; 424 output_volume_override_ = volume;
421 425
422 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 426 DCHECK(GetTaskRunner()->BelongsToCurrentThread());
423 for (OutputStreams::iterator it = streams_.begin(); 427 for (OutputStreams::iterator it = streams_.begin();
424 it != streams_.end(); ++it) { 428 it != streams_.end(); ++it) {
425 (*it)->SetVolume(volume); 429 (*it)->SetVolume(volume);
426 } 430 }
427 } 431 }
428 432
429 } // namespace media 433 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/android/audio_manager_android.h ('k') | media/audio/audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698