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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void getKernelsFromAzimuthElevation(double azimuthBlend, unsigned azimuthInd
ex, double elevationAngle, HRTFKernel* &kernelL, HRTFKernel* &kernelR, double& f
rameDelayL, double& frameDelayR); | 52 void getKernelsFromAzimuthElevation(double azimuthBlend, unsigned azimuthInd
ex, double elevationAngle, HRTFKernel* &kernelL, HRTFKernel* &kernelR, double& f
rameDelayL, double& frameDelayR); |
53 | 53 |
54 // Returns the number of different azimuth angles. | 54 // Returns the number of different azimuth angles. |
55 static unsigned numberOfAzimuths() { return HRTFElevation::NumberOfTotalAzim
uths; } | 55 static unsigned numberOfAzimuths() { return HRTFElevation::NumberOfTotalAzim
uths; } |
56 | 56 |
57 float sampleRate() const { return m_sampleRate; } | 57 float sampleRate() const { return m_sampleRate; } |
58 | 58 |
59 // Number of elevations loaded from resource. | 59 // Number of elevations loaded from resource. |
60 static const unsigned NumberOfRawElevations; | 60 static const unsigned NumberOfRawElevations; |
61 | 61 |
62 void reportMemoryUsage(MemoryObjectInfo*) const; | |
63 | |
64 private: | 62 private: |
65 explicit HRTFDatabase(float sampleRate); | 63 explicit HRTFDatabase(float sampleRate); |
66 | 64 |
67 // Minimum and maximum elevation angles (inclusive) for a HRTFDatabase. | 65 // Minimum and maximum elevation angles (inclusive) for a HRTFDatabase. |
68 static const int MinElevation; | 66 static const int MinElevation; |
69 static const int MaxElevation; | 67 static const int MaxElevation; |
70 static const unsigned RawElevationAngleSpacing; | 68 static const unsigned RawElevationAngleSpacing; |
71 | 69 |
72 // Interpolates by this factor to get the total number of elevations from ev
ery elevation loaded from resource. | 70 // Interpolates by this factor to get the total number of elevations from ev
ery elevation loaded from resource. |
73 static const unsigned InterpolationFactor; | 71 static const unsigned InterpolationFactor; |
74 | 72 |
75 // Total number of elevations after interpolation. | 73 // Total number of elevations after interpolation. |
76 static const unsigned NumberOfTotalElevations; | 74 static const unsigned NumberOfTotalElevations; |
77 | 75 |
78 // Returns the index for the correct HRTFElevation given the elevation angle
. | 76 // Returns the index for the correct HRTFElevation given the elevation angle
. |
79 static unsigned indexFromElevationAngle(double); | 77 static unsigned indexFromElevationAngle(double); |
80 | 78 |
81 Vector<OwnPtr<HRTFElevation> > m_elevations;
| 79 Vector<OwnPtr<HRTFElevation> > m_elevations;
|
82 float m_sampleRate; | 80 float m_sampleRate; |
83 }; | 81 }; |
84 | 82 |
85 } // namespace WebCore | 83 } // namespace WebCore |
86 | 84 |
87 #endif // HRTFDatabase_h | 85 #endif // HRTFDatabase_h |
OLD | NEW |