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_STREAM_IMPL_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_ |
6 #define MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "media/audio/audio_io.h" | 11 #include "media/audio/audio_io.h" |
12 | 12 |
13 namespace media { | |
14 | |
15 // AudioInputStreamImpl implements platform-independent parts of the | 13 // AudioInputStreamImpl implements platform-independent parts of the |
16 // AudioInputStream interface. Each platform dependent implementation | 14 // AudioInputStream interface. Each platform dependent implementation |
17 // should derive from this class. | 15 // should derive from this class. |
18 // TODO(henrika): we can probably break out more parts from our current | 16 // TODO(henrika): we can probably break out more parts from our current |
19 // AudioInputStream implementation and move out to this class. | 17 // AudioInputStream implementation and move out to this class. |
20 class MEDIA_EXPORT AudioInputStreamImpl : public AudioInputStream { | 18 class MEDIA_EXPORT AudioInputStreamImpl : public AudioInputStream { |
21 public: | 19 public: |
22 AudioInputStreamImpl(); | 20 AudioInputStreamImpl(); |
23 virtual ~AudioInputStreamImpl(); | 21 virtual ~AudioInputStreamImpl(); |
24 | 22 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 57 |
60 // Protects |agc_is_enabled_| and |volume_| . | 58 // Protects |agc_is_enabled_| and |volume_| . |
61 base::Lock lock_; | 59 base::Lock lock_; |
62 | 60 |
63 // Keeps track of the last time the microphone volume level was queried. | 61 // Keeps track of the last time the microphone volume level was queried. |
64 base::Time last_volume_update_time_; | 62 base::Time last_volume_update_time_; |
65 | 63 |
66 DISALLOW_COPY_AND_ASSIGN(AudioInputStreamImpl); | 64 DISALLOW_COPY_AND_ASSIGN(AudioInputStreamImpl); |
67 }; | 65 }; |
68 | 66 |
69 } // namespace media | |
70 | |
71 #endif // MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_ | 67 #endif // MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_ |
OLD | NEW |