| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef AudioDSPKernelProcessor_h | 31 #ifndef AudioDSPKernelProcessor_h |
| 32 #define AudioDSPKernelProcessor_h | 32 #define AudioDSPKernelProcessor_h |
| 33 | 33 |
| 34 #include "core/platform/audio/AudioBus.h" | 34 #include "core/platform/audio/AudioBus.h" |
| 35 #include "core/platform/audio/AudioProcessor.h" | 35 #include "core/platform/audio/AudioProcessor.h" |
| 36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/ThreadingPrimitives.h" |
| 38 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 39 | 40 |
| 40 namespace WebCore { | 41 namespace WebCore { |
| 41 | 42 |
| 42 class AudioBus; | 43 class AudioBus; |
| 43 class AudioDSPKernel; | 44 class AudioDSPKernel; |
| 44 class AudioProcessor; | 45 class AudioProcessor; |
| 45 | 46 |
| 46 // AudioDSPKernelProcessor processes one input -> one output (N channels each) | 47 // AudioDSPKernelProcessor processes one input -> one output (N channels each) |
| 47 // It uses one AudioDSPKernel object per channel to do the processing, thus ther
e is no cross-channel processing. | 48 // It uses one AudioDSPKernel object per channel to do the processing, thus ther
e is no cross-channel processing. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 62 virtual void process(const AudioBus* source, AudioBus* destination, size_t f
ramesToProcess); | 63 virtual void process(const AudioBus* source, AudioBus* destination, size_t f
ramesToProcess); |
| 63 virtual void reset(); | 64 virtual void reset(); |
| 64 virtual void setNumberOfChannels(unsigned numberOfChannels); | 65 virtual void setNumberOfChannels(unsigned numberOfChannels); |
| 65 virtual unsigned numberOfChannels() const { return m_numberOfChannels; } | 66 virtual unsigned numberOfChannels() const { return m_numberOfChannels; } |
| 66 | 67 |
| 67 virtual double tailTime() const OVERRIDE; | 68 virtual double tailTime() const OVERRIDE; |
| 68 virtual double latencyTime() const OVERRIDE; | 69 virtual double latencyTime() const OVERRIDE; |
| 69 | 70 |
| 70 protected: | 71 protected: |
| 71 Vector<OwnPtr<AudioDSPKernel> > m_kernels; | 72 Vector<OwnPtr<AudioDSPKernel> > m_kernels; |
| 73 mutable Mutex m_processLock; |
| 72 bool m_hasJustReset; | 74 bool m_hasJustReset; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace WebCore | 77 } // namespace WebCore |
| 76 | 78 |
| 77 #endif // AudioDSPKernelProcessor_h | 79 #endif // AudioDSPKernelProcessor_h |
| OLD | NEW |