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

Side by Side Diff: components/audio_modem/audio_recorder_impl.h

Issue 1901583005: Revert of Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_
6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // AudioInputStream::AudioInputCallback overrides: 72 // AudioInputStream::AudioInputCallback overrides:
73 // Called by the audio recorder when a full packet of audio data is 73 // Called by the audio recorder when a full packet of audio data is
74 // available. This is called from a special audio thread and the 74 // available. This is called from a special audio thread and the
75 // implementation should return as soon as possible. 75 // implementation should return as soon as possible.
76 void OnData(media::AudioInputStream* stream, 76 void OnData(media::AudioInputStream* stream,
77 const media::AudioBus* source, 77 const media::AudioBus* source,
78 uint32_t hardware_delay_bytes, 78 uint32_t hardware_delay_bytes,
79 double volume) override; 79 double volume) override;
80 void OnError(media::AudioInputStream* stream) override; 80 void OnError(media::AudioInputStream* stream) override;
81 81
82 // Flushes the audio loop, making sure that any queued operations are
83 // performed.
84 void FlushAudioLoopForTesting();
85
82 bool is_recording_; 86 bool is_recording_;
83 87
84 media::AudioInputStream* stream_; 88 media::AudioInputStream* stream_;
85 89
86 RecordedSamplesCallback decode_callback_; 90 RecordedSamplesCallback decode_callback_;
87 91
88 // Outside of the ctor/Initialize method, only access the next variables on 92 // Outside of the ctor/Initialize method, only access the next variables on
89 // the recording thread. 93 // the recording thread.
90 scoped_ptr<media::AudioBus> buffer_; 94 scoped_ptr<media::AudioBus> buffer_;
91 int total_buffer_frames_; 95 int total_buffer_frames_;
92 int buffer_frame_index_; 96 int buffer_frame_index_;
93 97
94 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; 98 scoped_ptr<media::AudioInputStream> input_stream_for_testing_;
95 scoped_ptr<media::AudioParameters> params_for_testing_; 99 scoped_ptr<media::AudioParameters> params_for_testing_;
96 100
97 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); 101 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl);
98 }; 102 };
99 103
100 } // namespace audio_modem 104 } // namespace audio_modem
101 105
102 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ 106 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_
OLDNEW
« no previous file with comments | « components/audio_modem/audio_player_unittest.cc ('k') | components/audio_modem/audio_recorder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698