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

Side by Side Diff: media/base/audio_buffer_converter.h

Issue 2004283002: AudioConverter: Express delay in frames rather than msec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed files & removed rounding Created 4 years, 7 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 | « media/audio/virtual_audio_output_stream.cc ('k') | media/base/audio_buffer_converter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 MEDIA_BASE_AUDIO_BUFFER_CONVERTER 5 #ifndef MEDIA_BASE_AUDIO_BUFFER_CONVERTER
6 #define MEDIA_BASE_AUDIO_BUFFER_CONVERTER 6 #define MEDIA_BASE_AUDIO_BUFFER_CONVERTER
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 int input_buffer_size_for_testing() const { 45 int input_buffer_size_for_testing() const {
46 return input_params_.frames_per_buffer(); 46 return input_params_.frames_per_buffer();
47 } 47 }
48 int input_frames_left_for_testing() const { 48 int input_frames_left_for_testing() const {
49 return input_frames_; 49 return input_frames_;
50 } 50 }
51 51
52 private: 52 private:
53 // Callback to provide data to the AudioConverter 53 // Callback to provide data to the AudioConverter
54 double ProvideInput(AudioBus* audio_bus, 54 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override;
55 base::TimeDelta buffer_delay) override;
56 55
57 // Reset the converter in response to a configuration change. 56 // Reset the converter in response to a configuration change.
58 void ResetConverter(const scoped_refptr<AudioBuffer>& input_buffer); 57 void ResetConverter(const scoped_refptr<AudioBuffer>& input_buffer);
59 58
60 // Perform conversion if we have enough data. 59 // Perform conversion if we have enough data.
61 void ConvertIfPossible(); 60 void ConvertIfPossible();
62 61
63 // Flush remaining output 62 // Flush remaining output
64 void Flush(); 63 void Flush();
65 64
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // full AudioBuses in ProvideInput()? 98 // full AudioBuses in ProvideInput()?
100 bool is_flushing_; 99 bool is_flushing_;
101 100
102 // The AudioConverter which does the real work here. 101 // The AudioConverter which does the real work here.
103 std::unique_ptr<AudioConverter> audio_converter_; 102 std::unique_ptr<AudioConverter> audio_converter_;
104 }; 103 };
105 104
106 } // namespace media 105 } // namespace media
107 106
108 #endif // MEDIA_BASE_AUDIO_BUFFER_CONVERTER 107 #endif // MEDIA_BASE_AUDIO_BUFFER_CONVERTER
OLDNEW
« no previous file with comments | « media/audio/virtual_audio_output_stream.cc ('k') | media/base/audio_buffer_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698