Changeset 191844 in webkit
- Timestamp:
- Oct 31, 2015, 10:48:47 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r191842 r191844 1 2015-10-31 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer][Mac] Fix WebAudio build 4 https://bugs.webkit.org/show_bug.cgi?id=150030 5 6 Reviewed by Darin Adler. 7 8 Wrap Accelerate.framework API calls around USE(ACCELERATE) ifdefs. 9 10 * platform/audio/Biquad.cpp: 11 (WebCore::Biquad::Biquad): 12 (WebCore::Biquad::process): 13 (WebCore::Biquad::reset): 14 * platform/audio/Biquad.h: 15 * platform/audio/DirectConvolver.cpp: 16 (WebCore::DirectConvolver::process): 17 * platform/audio/FFTFrame.h: 18 * platform/audio/VectorMath.cpp: 19 1 20 2015-10-31 Brian Burg <bburg@apple.com> 2 21 -
trunk/Source/WebCore/platform/audio/Biquad.cpp
r176537 r191844 38 38 #include <wtf/MathExtras.h> 39 39 40 #if OS(DARWIN)40 #if USE(ACCELERATE) 41 41 // Work around a bug where VForce.h forward declares std::complex in a way that's incompatible with libc++ complex. 42 42 #define __VFORCE_H … … 46 46 namespace WebCore { 47 47 48 #if OS(DARWIN)48 #if USE(ACCELERATE) 49 49 const int kBufferSize = 1024; 50 50 #endif … … 52 52 Biquad::Biquad() 53 53 { 54 #if OS(DARWIN)54 #if USE(ACCELERATE) 55 55 // Allocate two samples more for filter history 56 56 m_inputBuffer.allocate(kBufferSize + 2); … … 70 70 void Biquad::process(const float* sourceP, float* destP, size_t framesToProcess) 71 71 { 72 #if OS(DARWIN)72 #if USE(ACCELERATE) 73 73 // Use vecLib if available 74 74 processFast(sourceP, destP, framesToProcess); … … 119 119 } 120 120 121 #if OS(DARWIN)121 #if USE(ACCELERATE) 122 122 123 123 // Here we have optimized version using Accelerate.framework … … 173 173 } 174 174 175 #endif // OS(DARWIN)175 #endif // USE(ACCELERATE) 176 176 177 177 178 178 void Biquad::reset() 179 179 { 180 #if OS(DARWIN)180 #if USE(ACCELERATE) 181 181 // Two extra samples for filter history 182 182 double* inputP = m_inputBuffer.data(); -
trunk/Source/WebCore/platform/audio/Biquad.h
r175149 r191844 89 89 double m_a2; 90 90 91 #if OS(DARWIN)91 #if USE(ACCELERATE) 92 92 void processFast(const float* sourceP, float* destP, size_t framesToProcess); 93 93 void processSliceFast(double* sourceP, double* destP, double* coefficientsP, size_t framesToProcess); -
trunk/Source/WebCore/platform/audio/DirectConvolver.cpp
r185983 r191844 74 74 memcpy(inputP, sourceP, sizeof(float) * framesToProcess); 75 75 76 #if OS(DARWIN)76 #if USE(ACCELERATE) 77 77 #if defined(__ppc__) || defined(__i386__) 78 78 #pragma clang diagnostic push … … 353 353 destP[i++] = sum; 354 354 } 355 #endif // OS(DARWIN)355 #endif // USE(ACCELERATE) 356 356 357 357 // Copy 2nd half of input buffer to 1st half. -
trunk/Source/WebCore/platform/audio/FFTFrame.h
r172431 r191844 32 32 #include "AudioArray.h" 33 33 34 #if OS(DARWIN)35 #include <Accelerate/Accelerate.h>36 #endif37 38 34 #if USE(WEBAUDIO_GSTREAMER) 39 35 #include <glib.h> … … 42 38 G_END_DECLS 43 39 #endif // USE(WEBAUDIO_GSTREAMER) 40 41 #if USE(ACCELERATE) 42 #include <Accelerate/Accelerate.h> 43 #endif 44 44 45 45 #include <memory> … … 91 91 void interpolateFrequencyComponents(const FFTFrame& frame1, const FFTFrame& frame2, double x); 92 92 93 #if OS(DARWIN)93 #if USE(ACCELERATE) 94 94 DSPSplitComplex& dspSplitComplex() { return m_frame; } 95 95 DSPSplitComplex dspSplitComplex() const { return m_frame; } -
trunk/Source/WebCore/platform/audio/VectorMath.cpp
r185988 r191844 29 29 #include "VectorMath.h" 30 30 31 #if OS(DARWIN)31 #if USE(ACCELERATE) 32 32 #include <Accelerate/Accelerate.h> 33 33 #endif … … 48 48 namespace VectorMath { 49 49 50 #if OS(DARWIN)50 #if USE(ACCELERATE) 51 51 // On the Mac we use the highly optimized versions in Accelerate.framework 52 52 // In 32-bit mode (__ppc__ or __i386__) <Accelerate/Accelerate.h> includes <vecLib/vDSP_translate.h> which defines macros of the same name as … … 691 691 } 692 692 693 #endif // OS(DARWIN)693 #endif // USE(ACCELERATE) 694 694 695 695 } // namespace VectorMath
Note:
See TracChangeset
for help on using the changeset viewer.