OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ | 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ |
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ | 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void StopAndCloseOnAudioThread(); | 71 void StopAndCloseOnAudioThread(); |
72 void FinalizeOnAudioThread(); | 72 void FinalizeOnAudioThread(); |
73 | 73 |
74 // AudioInputStream::AudioInputCallback overrides: | 74 // AudioInputStream::AudioInputCallback overrides: |
75 // Called by the audio recorder when a full packet of audio data is | 75 // Called by the audio recorder when a full packet of audio data is |
76 // available. This is called from a special audio thread and the | 76 // available. This is called from a special audio thread and the |
77 // implementation should return as soon as possible. | 77 // implementation should return as soon as possible. |
78 virtual void OnData(media::AudioInputStream* stream, | 78 virtual void OnData(media::AudioInputStream* stream, |
79 const media::AudioBus* source, | 79 const media::AudioBus* source, |
80 uint32 hardware_delay_bytes, | 80 uint32 hardware_delay_bytes, |
81 double volume) OVERRIDE; | 81 double volume) override; |
82 virtual void OnError(media::AudioInputStream* stream) OVERRIDE; | 82 virtual void OnError(media::AudioInputStream* stream) override; |
83 | 83 |
84 // AudioConverter::InputCallback overrides: | 84 // AudioConverter::InputCallback overrides: |
85 virtual double ProvideInput(media::AudioBus* dest, | 85 virtual double ProvideInput(media::AudioBus* dest, |
86 base::TimeDelta buffer_delay) OVERRIDE; | 86 base::TimeDelta buffer_delay) override; |
87 | 87 |
88 // Flushes the audio loop, making sure that any queued operations are | 88 // Flushes the audio loop, making sure that any queued operations are |
89 // performed. | 89 // performed. |
90 void FlushAudioLoopForTesting(); | 90 void FlushAudioLoopForTesting(); |
91 | 91 |
92 bool is_recording_; | 92 bool is_recording_; |
93 | 93 |
94 media::AudioInputStream* stream_; | 94 media::AudioInputStream* stream_; |
95 DecodeSamplesCallback decode_callback_; | 95 DecodeSamplesCallback decode_callback_; |
96 | 96 |
(...skipping 10 matching lines...) Expand all Loading... |
107 | 107 |
108 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; | 108 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; |
109 scoped_ptr<media::AudioParameters> params_for_testing_; | 109 scoped_ptr<media::AudioParameters> params_for_testing_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(AudioRecorder); | 111 DISALLOW_COPY_AND_ASSIGN(AudioRecorder); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace copresence | 114 } // namespace copresence |
115 | 115 |
116 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ | 116 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_ |
OLD | NEW |