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

Side by Side Diff: webrtc/modules/audio_device/android/audio_device_template.h

Issue 3006803002: Removes unused APIs from the ADM (part II) (Closed)
Patch Set: nit Created 3 years, 3 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
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_buffer.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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override { 269 int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override {
270 LOG(INFO) << __FUNCTION__; 270 LOG(INFO) << __FUNCTION__;
271 return output_.MaxSpeakerVolume(maxVolume); 271 return output_.MaxSpeakerVolume(maxVolume);
272 } 272 }
273 273
274 int32_t MinSpeakerVolume(uint32_t& minVolume) const override { 274 int32_t MinSpeakerVolume(uint32_t& minVolume) const override {
275 LOG(INFO) << __FUNCTION__; 275 LOG(INFO) << __FUNCTION__;
276 return output_.MinSpeakerVolume(minVolume); 276 return output_.MinSpeakerVolume(minVolume);
277 } 277 }
278 278
279 int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override {
280 FATAL() << "Should never be called";
281 return -1;
282 }
283
284 int32_t MicrophoneVolumeIsAvailable(bool& available) override{ 279 int32_t MicrophoneVolumeIsAvailable(bool& available) override{
285 available = false; 280 available = false;
286 return -1; 281 return -1;
287 } 282 }
288 283
289 int32_t SetMicrophoneVolume(uint32_t volume) override { 284 int32_t SetMicrophoneVolume(uint32_t volume) override {
290 FATAL() << "Should never be called"; 285 FATAL() << "Should never be called";
291 return -1; 286 return -1;
292 } 287 }
293 288
294 int32_t MicrophoneVolume(uint32_t& volume) const override { 289 int32_t MicrophoneVolume(uint32_t& volume) const override {
295 FATAL() << "Should never be called"; 290 FATAL() << "Should never be called";
296 return -1; 291 return -1;
297 } 292 }
298 293
299 int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override { 294 int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override {
300 FATAL() << "Should never be called"; 295 FATAL() << "Should never be called";
301 return -1; 296 return -1;
302 } 297 }
303 298
304 int32_t MinMicrophoneVolume(uint32_t& minVolume) const override { 299 int32_t MinMicrophoneVolume(uint32_t& minVolume) const override {
305 FATAL() << "Should never be called"; 300 FATAL() << "Should never be called";
306 return -1; 301 return -1;
307 } 302 }
308 303
309 int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override {
310 FATAL() << "Should never be called";
311 return -1;
312 }
313
314 int32_t SpeakerMuteIsAvailable(bool& available) override { 304 int32_t SpeakerMuteIsAvailable(bool& available) override {
315 FATAL() << "Should never be called"; 305 FATAL() << "Should never be called";
316 return -1; 306 return -1;
317 } 307 }
318 308
319 int32_t SetSpeakerMute(bool enable) override { 309 int32_t SetSpeakerMute(bool enable) override {
320 FATAL() << "Should never be called"; 310 FATAL() << "Should never be called";
321 return -1; 311 return -1;
322 } 312 }
323 313
(...skipping 10 matching lines...) Expand all
334 int32_t SetMicrophoneMute(bool enable) override { 324 int32_t SetMicrophoneMute(bool enable) override {
335 FATAL() << "Not implemented"; 325 FATAL() << "Not implemented";
336 return -1; 326 return -1;
337 } 327 }
338 328
339 int32_t MicrophoneMute(bool& enabled) const override { 329 int32_t MicrophoneMute(bool& enabled) const override {
340 FATAL() << "Not implemented"; 330 FATAL() << "Not implemented";
341 return -1; 331 return -1;
342 } 332 }
343 333
344 int32_t MicrophoneBoostIsAvailable(bool& available) override {
345 FATAL() << "Should never be called";
346 return -1;
347 }
348
349 int32_t SetMicrophoneBoost(bool enable) override {
350 FATAL() << "Should never be called";
351 return -1;
352 }
353
354 int32_t MicrophoneBoost(bool& enabled) const override {
355 FATAL() << "Should never be called";
356 return -1;
357 }
358
359 int32_t StereoPlayoutIsAvailable(bool& available) override { 334 int32_t StereoPlayoutIsAvailable(bool& available) override {
360 LOG(INFO) << __FUNCTION__; 335 LOG(INFO) << __FUNCTION__;
361 available = false; 336 available = false;
362 return 0; 337 return 0;
363 } 338 }
364 339
365 // TODO(henrika): add support. 340 // TODO(henrika): add support.
366 int32_t SetStereoPlayout(bool enable) override { 341 int32_t SetStereoPlayout(bool enable) override {
367 LOG(INFO) << __FUNCTION__; 342 LOG(INFO) << __FUNCTION__;
368 // Allow disabling stereo playout, as that matches returning false(0) from 343 // Allow disabling stereo playout, as that matches returning false(0) from
(...skipping 18 matching lines...) Expand all
387 LOG(INFO) << __FUNCTION__; 362 LOG(INFO) << __FUNCTION__;
388 return -1; 363 return -1;
389 } 364 }
390 365
391 int32_t StereoRecording(bool& enabled) const override { 366 int32_t StereoRecording(bool& enabled) const override {
392 LOG(INFO) << __FUNCTION__; 367 LOG(INFO) << __FUNCTION__;
393 enabled = false; 368 enabled = false;
394 return 0; 369 return 0;
395 } 370 }
396 371
397 int32_t SetPlayoutBuffer(
398 const AudioDeviceModule::BufferType type, uint16_t sizeMS) override {
399 FATAL() << "Should never be called";
400 return -1;
401 }
402
403 int32_t PlayoutBuffer(
404 AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const override {
405 FATAL() << "Should never be called";
406 return -1;
407 }
408
409 int32_t PlayoutDelay(uint16_t& delay_ms) const override { 372 int32_t PlayoutDelay(uint16_t& delay_ms) const override {
410 // Best guess we can do is to use half of the estimated total delay. 373 // Best guess we can do is to use half of the estimated total delay.
411 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; 374 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2;
412 RTC_DCHECK_GT(delay_ms, 0); 375 RTC_DCHECK_GT(delay_ms, 0);
413 return 0; 376 return 0;
414 } 377 }
415 378
416 int32_t RecordingDelay(uint16_t& delay_ms) const override { 379 int32_t RecordingDelay(uint16_t& delay_ms) const override {
417 // Best guess we can do is to use half of the estimated total delay. 380 // Best guess we can do is to use half of the estimated total delay.
418 LOG(INFO) << __FUNCTION__; 381 LOG(INFO) << __FUNCTION__;
419 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; 382 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2;
420 RTC_DCHECK_GT(delay_ms, 0); 383 RTC_DCHECK_GT(delay_ms, 0);
421 return 0; 384 return 0;
422 } 385 }
423 386
424 int32_t CPULoad(uint16_t& load) const override {
425 FATAL() << "Should never be called";
426 return -1;
427 }
428
429 bool PlayoutWarning() const override { 387 bool PlayoutWarning() const override {
430 return false; 388 return false;
431 } 389 }
432 390
433 bool PlayoutError() const override { 391 bool PlayoutError() const override {
434 return false; 392 return false;
435 } 393 }
436 394
437 bool RecordingWarning() const override { 395 bool RecordingWarning() const override {
438 return false; 396 return false;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 OutputType output_; 502 OutputType output_;
545 503
546 InputType input_; 504 InputType input_;
547 505
548 bool initialized_; 506 bool initialized_;
549 }; 507 };
550 508
551 } // namespace webrtc 509 } // namespace webrtc
552 510
553 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ 511 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698