| 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 12 matching lines...) Expand all Loading... |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 | 26 |
| 27 #if ENABLE(WEB_AUDIO) | 27 #if ENABLE(WEB_AUDIO) |
| 28 | 28 |
| 29 #include "modules/webaudio/DelayProcessor.h" | 29 #include "modules/webaudio/DelayProcessor.h" |
| 30 | 30 |
| 31 #include "modules/webaudio/DelayDSPKernel.h" | 31 #include "modules/webaudio/DelayDSPKernel.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace blink { |
| 34 | 34 |
| 35 DelayProcessor::DelayProcessor(AudioContext* context, float sampleRate, unsigned
numberOfChannels, double maxDelayTime) | 35 DelayProcessor::DelayProcessor(AudioContext* context, float sampleRate, unsigned
numberOfChannels, double maxDelayTime) |
| 36 : AudioDSPKernelProcessor(sampleRate, numberOfChannels) | 36 : AudioDSPKernelProcessor(sampleRate, numberOfChannels) |
| 37 , m_maxDelayTime(maxDelayTime) | 37 , m_maxDelayTime(maxDelayTime) |
| 38 { | 38 { |
| 39 m_delayTime = AudioParam::create(context, "delayTime", 0.0, 0.0, maxDelayTim
e); | 39 m_delayTime = AudioParam::create(context, "delayTime", 0.0, 0.0, maxDelayTim
e); |
| 40 } | 40 } |
| 41 | 41 |
| 42 DelayProcessor::~DelayProcessor() | 42 DelayProcessor::~DelayProcessor() |
| 43 { | 43 { |
| 44 if (isInitialized()) | 44 if (isInitialized()) |
| 45 uninitialize(); | 45 uninitialize(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 PassOwnPtr<AudioDSPKernel> DelayProcessor::createKernel() | 48 PassOwnPtr<AudioDSPKernel> DelayProcessor::createKernel() |
| 49 { | 49 { |
| 50 return adoptPtr(new DelayDSPKernel(this)); | 50 return adoptPtr(new DelayDSPKernel(this)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace WebCore | 53 } // namespace blink |
| 54 | 54 |
| 55 #endif // ENABLE(WEB_AUDIO) | 55 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |