| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |