| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef UpSampler_h | 31 #ifndef UpSampler_h |
| 32 #define UpSampler_h | 32 #define UpSampler_h |
| 33 | 33 |
| 34 #include "platform/audio/AudioArray.h" | 34 #include "platform/audio/AudioArray.h" |
| 35 #include "platform/audio/DirectConvolver.h" | 35 #include "platform/audio/DirectConvolver.h" |
| 36 #include "wtf/Allocator.h" | 36 #include "wtf/Allocator.h" |
| 37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
| 38 | 38 |
| 39 #if ENABLE(WEB_AUDIO) | |
| 40 | |
| 41 namespace blink { | 39 namespace blink { |
| 42 | 40 |
| 43 // UpSampler up-samples the source stream by a factor of 2x. | 41 // UpSampler up-samples the source stream by a factor of 2x. |
| 44 | 42 |
| 45 class PLATFORM_EXPORT UpSampler { | 43 class PLATFORM_EXPORT UpSampler { |
| 46 USING_FAST_MALLOC(UpSampler); | 44 USING_FAST_MALLOC(UpSampler); |
| 47 WTF_MAKE_NONCOPYABLE(UpSampler); | 45 WTF_MAKE_NONCOPYABLE(UpSampler); |
| 48 public: | 46 public: |
| 49 UpSampler(size_t inputBlockSize); | 47 UpSampler(size_t inputBlockSize); |
| 50 | 48 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 72 AudioFloatArray m_tempBuffer; | 70 AudioFloatArray m_tempBuffer; |
| 73 | 71 |
| 74 // Delay line for generating the even sample-frames of the output. | 72 // Delay line for generating the even sample-frames of the output. |
| 75 // The source samples are delayed exactly to match the linear phase delay of
the FIR filter (convolution) | 73 // The source samples are delayed exactly to match the linear phase delay of
the FIR filter (convolution) |
| 76 // used to generate the odd sample-frames of the output. | 74 // used to generate the odd sample-frames of the output. |
| 77 AudioFloatArray m_inputBuffer; | 75 AudioFloatArray m_inputBuffer; |
| 78 }; | 76 }; |
| 79 | 77 |
| 80 } // namespace blink | 78 } // namespace blink |
| 81 | 79 |
| 82 #endif // ENABLE(WEB_AUDIO) | |
| 83 | |
| 84 #endif // UpSampler_h | 80 #endif // UpSampler_h |
| OLD | NEW |