| OLD | NEW |
| 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 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void DoCreateForLowLatency(AudioManager* audio_manager, | 278 void DoCreateForLowLatency(AudioManager* audio_manager, |
| 279 const AudioParameters& params, | 279 const AudioParameters& params, |
| 280 const std::string& device_id); | 280 const std::string& device_id); |
| 281 void DoCreateForStream(AudioInputStream* stream_to_control); | 281 void DoCreateForStream(AudioInputStream* stream_to_control); |
| 282 void DoRecord(); | 282 void DoRecord(); |
| 283 void DoClose(); | 283 void DoClose(); |
| 284 void DoReportError(); | 284 void DoReportError(); |
| 285 void DoSetVolume(double volume); | 285 void DoSetVolume(double volume); |
| 286 void DoSetAutomaticGainControl(bool enabled); | 286 void DoSetAutomaticGainControl(bool enabled); |
| 287 void DoOnData(scoped_ptr<AudioBus> data); | 287 void DoOnData(scoped_ptr<AudioBus> data); |
| 288 void DoLogAudioLevel(float level_dbfs); | 288 void DoLogAudioLevels(float level_dbfs, int microphone_volume_percent); |
| 289 | 289 |
| 290 // Method to check if we get recorded data after a stream was started, | 290 // Method to check if we get recorded data after a stream was started, |
| 291 // and log the result to UMA. | 291 // and log the result to UMA. |
| 292 void FirstCheckForNoData(); | 292 void FirstCheckForNoData(); |
| 293 | 293 |
| 294 // Method which ensures that OnError() is triggered when data recording | 294 // Method which ensures that OnError() is triggered when data recording |
| 295 // times out. Called on the audio thread. | 295 // times out. Called on the audio thread. |
| 296 void DoCheckForNoData(); | 296 void DoCheckForNoData(); |
| 297 | 297 |
| 298 // Helper method that stops, closes, and NULL:s |*stream_|. | 298 // Helper method that stops, closes, and NULL:s |*stream_|. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 // Time when a low-latency stream is created. | 372 // Time when a low-latency stream is created. |
| 373 base::TimeTicks low_latency_create_time_; | 373 base::TimeTicks low_latency_create_time_; |
| 374 | 374 |
| 375 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 375 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 } // namespace media | 378 } // namespace media |
| 379 | 379 |
| 380 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 380 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
| OLD | NEW |