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

Side by Side Diff: content/renderer/media/webrtc_local_audio_source_provider.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // blink::WebAudioSourceProvider implementation. 69 // blink::WebAudioSourceProvider implementation.
70 void setClient(blink::WebAudioSourceProviderClient* client) override; 70 void setClient(blink::WebAudioSourceProviderClient* client) override;
71 void provideInput(const blink::WebVector<float*>& audio_data, 71 void provideInput(const blink::WebVector<float*>& audio_data,
72 size_t number_of_frames) override; 72 size_t number_of_frames) override;
73 73
74 // media::AudioConverter::Inputcallback implementation. 74 // media::AudioConverter::Inputcallback implementation.
75 // This function is triggered by provideInput()on the WebAudio audio thread, 75 // This function is triggered by provideInput()on the WebAudio audio thread,
76 // so it has been under the protection of |lock_|. 76 // so it has been under the protection of |lock_|.
77 double ProvideInput(media::AudioBus* audio_bus, 77 double ProvideInput(media::AudioBus* audio_bus,
78 base::TimeDelta buffer_delay) override; 78 uint32_t frames_delayed) override;
79 79
80 // Method to allow the unittests to inject its own sink parameters to avoid 80 // Method to allow the unittests to inject its own sink parameters to avoid
81 // query the hardware. 81 // query the hardware.
82 // TODO(xians,tommi): Remove and instead offer a way to inject the sink 82 // TODO(xians,tommi): Remove and instead offer a way to inject the sink
83 // parameters so that the implementation doesn't rely on the global default 83 // parameters so that the implementation doesn't rely on the global default
84 // hardware config but instead gets the parameters directly from the sink 84 // hardware config but instead gets the parameters directly from the sink
85 // (WebAudio in this case). Ideally the unit test should be able to use that 85 // (WebAudio in this case). Ideally the unit test should be able to use that
86 // same mechanism to inject the sink parameters for testing. 86 // same mechanism to inject the sink parameters for testing.
87 void SetSinkParamsForTesting(const media::AudioParameters& sink_params); 87 void SetSinkParamsForTesting(const media::AudioParameters& sink_params);
88 88
(...skipping 19 matching lines...) Expand all
108 108
109 // Flag to tell if the track has been stopped or not. 109 // Flag to tell if the track has been stopped or not.
110 bool track_stopped_; 110 bool track_stopped_;
111 111
112 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioSourceProvider); 112 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioSourceProvider);
113 }; 113 };
114 114
115 } // namespace content 115 } // namespace content
116 116
117 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_ 117 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_SOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/speech_recognition_audio_sink.cc ('k') | content/renderer/media/webrtc_local_audio_source_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698