OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "modules/webaudio/AudioBuffer.h" | 28 #include "modules/webaudio/AudioBuffer.h" |
29 #include "modules/webaudio/AudioParam.h" | 29 #include "modules/webaudio/AudioParam.h" |
30 #include "modules/webaudio/AudioScheduledSourceNode.h" | 30 #include "modules/webaudio/AudioScheduledSourceNode.h" |
31 #include "modules/webaudio/PannerNode.h" | 31 #include "modules/webaudio/PannerNode.h" |
32 #include "platform/audio/AudioBus.h" | 32 #include "platform/audio/AudioBus.h" |
33 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
36 #include "wtf/Threading.h" | 36 #include "wtf/Threading.h" |
37 | 37 |
38 #if ENABLE(WEB_AUDIO) | |
39 | |
40 namespace blink { | 38 namespace blink { |
41 | 39 |
42 class AbstractAudioContext; | 40 class AbstractAudioContext; |
43 | 41 |
44 // AudioBufferSourceNode is an AudioNode representing an audio source from an in
-memory audio asset represented by an AudioBuffer. | 42 // AudioBufferSourceNode is an AudioNode representing an audio source from an in
-memory audio asset represented by an AudioBuffer. |
45 // It generally will be used for short sounds which require a high degree of sch
eduling flexibility (can playback in rhythmically perfect ways). | 43 // It generally will be used for short sounds which require a high degree of sch
eduling flexibility (can playback in rhythmically perfect ways). |
46 | 44 |
47 class AudioBufferSourceHandler final : public AudioScheduledSourceHandler { | 45 class AudioBufferSourceHandler final : public AudioScheduledSourceHandler { |
48 public: | 46 public: |
49 static PassRefPtr<AudioBufferSourceHandler> create(AudioNode&, float sampleR
ate, AudioParamHandler& playbackRate, AudioParamHandler& detune); | 47 static PassRefPtr<AudioBufferSourceHandler> create(AudioNode&, float sampleR
ate, AudioParamHandler& playbackRate, AudioParamHandler& detune); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 182 |
185 private: | 183 private: |
186 AudioBufferSourceNode(AbstractAudioContext&, float sampleRate); | 184 AudioBufferSourceNode(AbstractAudioContext&, float sampleRate); |
187 | 185 |
188 Member<AudioParam> m_playbackRate; | 186 Member<AudioParam> m_playbackRate; |
189 Member<AudioParam> m_detune; | 187 Member<AudioParam> m_detune; |
190 }; | 188 }; |
191 | 189 |
192 } // namespace blink | 190 } // namespace blink |
193 | 191 |
194 #endif // ENABLE(WEB_AUDIO) | |
195 | |
196 #endif // AudioBufferSourceNode_h | 192 #endif // AudioBufferSourceNode_h |
OLD | NEW |