1e14391e94c850b8bd03680c23b38978db68687a8John Reck/* 2e14391e94c850b8bd03680c23b38978db68687a8John Reck * Copyright (C) 2010, Google Inc. All rights reserved. 3e14391e94c850b8bd03680c23b38978db68687a8John Reck * 4e14391e94c850b8bd03680c23b38978db68687a8John Reck * Redistribution and use in source and binary forms, with or without 5e14391e94c850b8bd03680c23b38978db68687a8John Reck * modification, are permitted provided that the following conditions 6e14391e94c850b8bd03680c23b38978db68687a8John Reck * are met: 7e14391e94c850b8bd03680c23b38978db68687a8John Reck * 1. Redistributions of source code must retain the above copyright 8e14391e94c850b8bd03680c23b38978db68687a8John Reck * notice, this list of conditions and the following disclaimer. 9e14391e94c850b8bd03680c23b38978db68687a8John Reck * 2. Redistributions in binary form must reproduce the above copyright 10e14391e94c850b8bd03680c23b38978db68687a8John Reck * notice, this list of conditions and the following disclaimer in the 11e14391e94c850b8bd03680c23b38978db68687a8John Reck * documentation and/or other materials provided with the distribution. 12e14391e94c850b8bd03680c23b38978db68687a8John Reck * 13e14391e94c850b8bd03680c23b38978db68687a8John Reck * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14e14391e94c850b8bd03680c23b38978db68687a8John Reck * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15e14391e94c850b8bd03680c23b38978db68687a8John Reck * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16e14391e94c850b8bd03680c23b38978db68687a8John Reck * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17e14391e94c850b8bd03680c23b38978db68687a8John Reck * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18e14391e94c850b8bd03680c23b38978db68687a8John Reck * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19e14391e94c850b8bd03680c23b38978db68687a8John Reck * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20e14391e94c850b8bd03680c23b38978db68687a8John Reck * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21e14391e94c850b8bd03680c23b38978db68687a8John Reck * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22e14391e94c850b8bd03680c23b38978db68687a8John Reck * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23e14391e94c850b8bd03680c23b38978db68687a8John Reck */ 24e14391e94c850b8bd03680c23b38978db68687a8John Reck 25e14391e94c850b8bd03680c23b38978db68687a8John Reck#ifndef DelayNode_h 26e14391e94c850b8bd03680c23b38978db68687a8John Reck#define DelayNode_h 27e14391e94c850b8bd03680c23b38978db68687a8John Reck 28e14391e94c850b8bd03680c23b38978db68687a8John Reck#include "AudioBasicProcessorNode.h" 29e14391e94c850b8bd03680c23b38978db68687a8John Reck#include "DelayProcessor.h" 30e14391e94c850b8bd03680c23b38978db68687a8John Reck#include <wtf/PassRefPtr.h> 31e14391e94c850b8bd03680c23b38978db68687a8John Reck 32e14391e94c850b8bd03680c23b38978db68687a8John Recknamespace WebCore { 33e14391e94c850b8bd03680c23b38978db68687a8John Reck 34e14391e94c850b8bd03680c23b38978db68687a8John Reckclass AudioParam; 35e14391e94c850b8bd03680c23b38978db68687a8John Reck 36e14391e94c850b8bd03680c23b38978db68687a8John Reckclass DelayNode : public AudioBasicProcessorNode { 37e14391e94c850b8bd03680c23b38978db68687a8John Reckpublic: 38e14391e94c850b8bd03680c23b38978db68687a8John Reck static PassRefPtr<DelayNode> create(AudioContext* context, double sampleRate) 39e14391e94c850b8bd03680c23b38978db68687a8John Reck { 40e14391e94c850b8bd03680c23b38978db68687a8John Reck return adoptRef(new DelayNode(context, sampleRate)); 41e14391e94c850b8bd03680c23b38978db68687a8John Reck } 42e14391e94c850b8bd03680c23b38978db68687a8John Reck 43e14391e94c850b8bd03680c23b38978db68687a8John Reck AudioParam* delayTime(); 44e14391e94c850b8bd03680c23b38978db68687a8John Reck 45e14391e94c850b8bd03680c23b38978db68687a8John Reckprivate: 46e14391e94c850b8bd03680c23b38978db68687a8John Reck DelayNode(AudioContext*, double sampleRate); 47e14391e94c850b8bd03680c23b38978db68687a8John Reck 48e14391e94c850b8bd03680c23b38978db68687a8John Reck DelayProcessor* delayProcessor() { return static_cast<DelayProcessor*>(processor()); } 49e14391e94c850b8bd03680c23b38978db68687a8John Reck}; 50e14391e94c850b8bd03680c23b38978db68687a8John Reck 51e14391e94c850b8bd03680c23b38978db68687a8John Reck} // namespace WebCore 52e14391e94c850b8bd03680c23b38978db68687a8John Reck 53e14391e94c850b8bd03680c23b38978db68687a8John Reck#endif // DelayNode_h 54