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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Returns true on success. | 85 // Returns true on success. |
86 static bool calculateKernelsForAzimuthElevation(int azimuth, int elevation,
float sampleRate, const String& subjectName, | 86 static bool calculateKernelsForAzimuthElevation(int azimuth, int elevation,
float sampleRate, const String& subjectName, |
87 RefPtr<HRTFKernel>& kernelL,
RefPtr<HRTFKernel>& kernelR); | 87 RefPtr<HRTFKernel>& kernelL,
RefPtr<HRTFKernel>& kernelR); |
88 | 88 |
89 // Given a specific azimuth and elevation angle, returns the left and right
HRTFKernel in kernelL and kernelR. | 89 // Given a specific azimuth and elevation angle, returns the left and right
HRTFKernel in kernelL and kernelR. |
90 // This method averages the measured response using symmetry of azimuth (for
example by averaging the -30.0 and +30.0 azimuth responses). | 90 // This method averages the measured response using symmetry of azimuth (for
example by averaging the -30.0 and +30.0 azimuth responses). |
91 // Returns true on success. | 91 // Returns true on success. |
92 static bool calculateSymmetricKernelsForAzimuthElevation(int azimuth, int el
evation, float sampleRate, const String& subjectName, | 92 static bool calculateSymmetricKernelsForAzimuthElevation(int azimuth, int el
evation, float sampleRate, const String& subjectName, |
93 RefPtr<HRTFKernel>&
kernelL, RefPtr<HRTFKernel>& kernelR); | 93 RefPtr<HRTFKernel>&
kernelL, RefPtr<HRTFKernel>& kernelR); |
94 | 94 |
95 void reportMemoryUsage(MemoryObjectInfo*) const; | |
96 | |
97 private: | 95 private: |
98 HRTFElevation(PassOwnPtr<HRTFKernelList> kernelListL, PassOwnPtr<HRTFKernelL
ist> kernelListR, int elevation, float sampleRate) | 96 HRTFElevation(PassOwnPtr<HRTFKernelList> kernelListL, PassOwnPtr<HRTFKernelL
ist> kernelListR, int elevation, float sampleRate) |
99 : m_kernelListL(kernelListL) | 97 : m_kernelListL(kernelListL) |
100 , m_kernelListR(kernelListR) | 98 , m_kernelListR(kernelListR) |
101 , m_elevationAngle(elevation) | 99 , m_elevationAngle(elevation) |
102 , m_sampleRate(sampleRate) | 100 , m_sampleRate(sampleRate) |
103 { | 101 { |
104 } | 102 } |
105 | 103 |
106 OwnPtr<HRTFKernelList> m_kernelListL; | 104 OwnPtr<HRTFKernelList> m_kernelListL; |
107 OwnPtr<HRTFKernelList> m_kernelListR; | 105 OwnPtr<HRTFKernelList> m_kernelListR; |
108 double m_elevationAngle; | 106 double m_elevationAngle; |
109 float m_sampleRate; | 107 float m_sampleRate; |
110 }; | 108 }; |
111 | 109 |
112 } // namespace WebCore | 110 } // namespace WebCore |
113 | 111 |
114 #endif // HRTFElevation_h | 112 #endif // HRTFElevation_h |
OLD | NEW |