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

Side by Side Diff: media/blink/webaudiosourceprovider_impl.h

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Rebase. Created 4 years, 6 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 MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
6 #define MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ 6 #define MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 explicit WebAudioSourceProviderImpl( 50 explicit WebAudioSourceProviderImpl(
51 const scoped_refptr<SwitchableAudioRendererSink>& sink); 51 const scoped_refptr<SwitchableAudioRendererSink>& sink);
52 52
53 // blink::WebAudioSourceProvider implementation. 53 // blink::WebAudioSourceProvider implementation.
54 void setClient(blink::WebAudioSourceProviderClient* client) override; 54 void setClient(blink::WebAudioSourceProviderClient* client) override;
55 void provideInput(const blink::WebVector<float*>& audio_data, 55 void provideInput(const blink::WebVector<float*>& audio_data,
56 size_t number_of_frames) override; 56 size_t number_of_frames) override;
57 57
58 // RestartableAudioRendererSink implementation. 58 // RestartableAudioRendererSink implementation.
59 void Initialize(const AudioParameters& params,
60 RenderCallback* renderer) override;
59 void Start() override; 61 void Start() override;
60 void Stop() override; 62 void Stop() override;
61 void Play() override; 63 void Play() override;
62 void Pause() override; 64 void Pause() override;
63 bool SetVolume(double volume) override; 65 bool SetVolume(double volume) override;
64 OutputDeviceInfo GetOutputDeviceInfo() override; 66 OutputDeviceInfo GetOutputDeviceInfo() override;
65 void Initialize(const AudioParameters& params, 67 bool CurrentThreadIsRenderingThread() override;
66 RenderCallback* renderer) override;
67 void SwitchOutputDevice(const std::string& device_id, 68 void SwitchOutputDevice(const std::string& device_id,
68 const url::Origin& security_origin, 69 const url::Origin& security_origin,
69 const OutputDeviceStatusCB& callback) override; 70 const OutputDeviceStatusCB& callback) override;
70 71
71 // These methods allow a client to get a copy of the rendered audio. 72 // These methods allow a client to get a copy of the rendered audio.
72 void SetCopyAudioCallback(const CopyAudioCB& callback); 73 void SetCopyAudioCallback(const CopyAudioCB& callback);
73 void ClearCopyAudioCallback(); 74 void ClearCopyAudioCallback();
74 75
75 int RenderForTesting(AudioBus* audio_bus); 76 int RenderForTesting(AudioBus* audio_bus);
76 77
(...skipping 27 matching lines...) Expand all
104 105
105 // NOTE: Weak pointers must be invalidated before all other member variables. 106 // NOTE: Weak pointers must be invalidated before all other member variables.
106 base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_; 107 base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_;
107 108
108 DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl); 109 DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl);
109 }; 110 };
110 111
111 } // namespace media 112 } // namespace media
112 113
113 #endif // MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ 114 #endif // MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698