| 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 25 matching lines...) Expand all Loading... |
| 36 #include "wtf/Threading.h" | 36 #include "wtf/Threading.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class AudioContext; | 40 class AudioContext; |
| 41 | 41 |
| 42 // 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. |
| 43 // 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). |
| 44 | 44 |
| 45 class AudioBufferSourceNode FINAL : public AudioScheduledSourceNode { | 45 class AudioBufferSourceNode FINAL : public AudioScheduledSourceNode { |
| 46 DEFINE_WRAPPERTYPEINFO(); |
| 46 public: | 47 public: |
| 47 static AudioBufferSourceNode* create(AudioContext*, float sampleRate); | 48 static AudioBufferSourceNode* create(AudioContext*, float sampleRate); |
| 48 | 49 |
| 49 virtual ~AudioBufferSourceNode(); | 50 virtual ~AudioBufferSourceNode(); |
| 50 | 51 |
| 51 // AudioNode | 52 // AudioNode |
| 52 virtual void dispose() OVERRIDE; | 53 virtual void dispose() OVERRIDE; |
| 53 virtual void process(size_t framesToProcess) OVERRIDE; | 54 virtual void process(size_t framesToProcess) OVERRIDE; |
| 54 | 55 |
| 55 // setBuffer() is called on the main thread. This is the buffer we use for p
layback. | 56 // setBuffer() is called on the main thread. This is the buffer we use for p
layback. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // AudioNode::breakConnection() when we remove an AudioNode from this. | 142 // AudioNode::breakConnection() when we remove an AudioNode from this. |
| 142 Member<PannerNode> m_pannerNode; | 143 Member<PannerNode> m_pannerNode; |
| 143 | 144 |
| 144 // This synchronizes process() with setBuffer() which can cause dynamic chan
nel count changes. | 145 // This synchronizes process() with setBuffer() which can cause dynamic chan
nel count changes. |
| 145 mutable Mutex m_processLock; | 146 mutable Mutex m_processLock; |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 } // namespace blink | 149 } // namespace blink |
| 149 | 150 |
| 150 #endif // AudioBufferSourceNode_h | 151 #endif // AudioBufferSourceNode_h |
| OLD | NEW |