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

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

Issue 2382473002: Merge M54: "Break out WebAudio suspension code into new class. Add tests." (Closed)
Patch Set: Fix conflicts. Created 4 years, 2 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/base/BUILD.gn ('k') | media/base/fake_audio_render_callback.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_FAKE_AUDIO_RENDER_CALLBACK_H_ 5 #ifndef MEDIA_BASE_FAKE_AUDIO_RENDER_CALLBACK_H_
6 #define MEDIA_BASE_FAKE_AUDIO_RENDER_CALLBACK_H_ 6 #define MEDIA_BASE_FAKE_AUDIO_RENDER_CALLBACK_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Returns the last |frames_delayed| provided to Render() or -1 if 46 // Returns the last |frames_delayed| provided to Render() or -1 if
47 // no Render() call occurred. 47 // no Render() call occurred.
48 int last_frames_delayed() const { return last_frames_delayed_; } 48 int last_frames_delayed() const { return last_frames_delayed_; }
49 49
50 // Set volume information used by ProvideAudioTransformInput(). 50 // Set volume information used by ProvideAudioTransformInput().
51 void set_volume(double volume) { volume_ = volume; } 51 void set_volume(double volume) { volume_ = volume; }
52 52
53 int last_channel_count() const { return last_channel_count_; } 53 int last_channel_count() const { return last_channel_count_; }
54 54
55 private: 55 private:
56 int RenderInternal(AudioBus* audio_bus,
57 uint32_t frames_delayed,
58 double volume);
59
56 bool half_fill_; 60 bool half_fill_;
57 double x_; 61 double x_;
58 double step_; 62 double step_;
59 int last_frames_delayed_; 63 int last_frames_delayed_;
60 int last_channel_count_; 64 int last_channel_count_;
61 double volume_; 65 double volume_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(FakeAudioRenderCallback); 67 DISALLOW_COPY_AND_ASSIGN(FakeAudioRenderCallback);
64 }; 68 };
65 69
66 } // namespace media 70 } // namespace media
67 71
68 #endif // MEDIA_BASE_FAKE_AUDIO_RENDER_CALLBACK_H_ 72 #endif // MEDIA_BASE_FAKE_AUDIO_RENDER_CALLBACK_H_
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/fake_audio_render_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698