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 18 matching lines...) Expand all Loading... |
29 #include "modules/webaudio/AudioNode.h" | 29 #include "modules/webaudio/AudioNode.h" |
30 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
33 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class AudioBuffer; | 37 class AudioBuffer; |
38 class AudioContext; | 38 class AudioContext; |
39 class AudioProcessingEvent; | |
40 | 39 |
41 // ScriptProcessorNode is an AudioNode which allows for arbitrary synthesis or p
rocessing directly using JavaScript. | 40 // ScriptProcessorNode is an AudioNode which allows for arbitrary synthesis or p
rocessing directly using JavaScript. |
42 // The API allows for a variable number of inputs and outputs, although it must
have at least one input or output. | 41 // The API allows for a variable number of inputs and outputs, although it must
have at least one input or output. |
43 // This basic implementation supports no more than one input and output. | 42 // This basic implementation supports no more than one input and output. |
44 // The "onaudioprocess" attribute is an event listener which will get called per
iodically with an AudioProcessingEvent which has | 43 // The "onaudioprocess" attribute is an event listener which will get called per
iodically with an AudioProcessingEvent which has |
45 // AudioBuffers for each input and output. | 44 // AudioBuffers for each input and output. |
46 | 45 |
47 class ScriptProcessorNode final : public AudioNode { | 46 class ScriptProcessorNode final : public AudioNode { |
48 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
49 public: | 48 public: |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 unsigned m_numberOfOutputChannels; | 92 unsigned m_numberOfOutputChannels; |
94 | 93 |
95 RefPtr<AudioBus> m_internalInputBus; | 94 RefPtr<AudioBus> m_internalInputBus; |
96 // Synchronize process() with fireProcessEvent(). | 95 // Synchronize process() with fireProcessEvent(). |
97 mutable Mutex m_processEventLock; | 96 mutable Mutex m_processEventLock; |
98 }; | 97 }; |
99 | 98 |
100 } // namespace blink | 99 } // namespace blink |
101 | 100 |
102 #endif // ScriptProcessorNode_h | 101 #endif // ScriptProcessorNode_h |
OLD | NEW |