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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void setOrientation(float x, | 109 void setOrientation(float x, |
110 float y, | 110 float y, |
111 float z, | 111 float z, |
112 float upX, | 112 float upX, |
113 float upY, | 113 float upY, |
114 float upZ) { | 114 float upZ) { |
115 setOrientation(FloatPoint3D(x, y, z)); | 115 setOrientation(FloatPoint3D(x, y, z)); |
116 setUpVector(FloatPoint3D(upX, upY, upZ)); | 116 setUpVector(FloatPoint3D(upX, upY, upZ)); |
117 } | 117 } |
118 | 118 |
119 // Velocity | |
120 void setVelocity(float x, float y, float z); | |
121 | |
122 // Doppler factor | |
123 void setDopplerFactor(double); | |
124 double dopplerFactor() const { return m_dopplerFactor; } | |
125 | |
126 // Speed of sound | |
127 void setSpeedOfSound(double); | |
128 double speedOfSound() const { return m_speedOfSound; } | |
129 | |
130 Mutex& listenerLock() { return m_listenerLock; } | 119 Mutex& listenerLock() { return m_listenerLock; } |
131 void addPanner(PannerHandler&); | 120 void addPanner(PannerHandler&); |
132 void removePanner(PannerHandler&); | 121 void removePanner(PannerHandler&); |
133 | 122 |
134 // HRTF DB loader | 123 // HRTF DB loader |
135 HRTFDatabaseLoader* hrtfDatabaseLoader() { | 124 HRTFDatabaseLoader* hrtfDatabaseLoader() { |
136 return m_hrtfDatabaseLoader.get(); | 125 return m_hrtfDatabaseLoader.get(); |
137 } | 126 } |
138 void createAndLoadHRTFDatabaseLoader(float); | 127 void createAndLoadHRTFDatabaseLoader(float); |
139 bool isHRTFDatabaseLoaded(); | 128 bool isHRTFDatabaseLoaded(); |
(...skipping 18 matching lines...) Expand all Loading... |
158 // Forward direction vector of the listener | 147 // Forward direction vector of the listener |
159 Member<AudioParam> m_forwardX; | 148 Member<AudioParam> m_forwardX; |
160 Member<AudioParam> m_forwardY; | 149 Member<AudioParam> m_forwardY; |
161 Member<AudioParam> m_forwardZ; | 150 Member<AudioParam> m_forwardZ; |
162 | 151 |
163 // Up direction vector for the listener | 152 // Up direction vector for the listener |
164 Member<AudioParam> m_upX; | 153 Member<AudioParam> m_upX; |
165 Member<AudioParam> m_upY; | 154 Member<AudioParam> m_upY; |
166 Member<AudioParam> m_upZ; | 155 Member<AudioParam> m_upZ; |
167 | 156 |
168 double m_dopplerFactor; | |
169 double m_speedOfSound; | |
170 | |
171 // The position, forward, and up vectors from the last rendering quantum. | 157 // The position, forward, and up vectors from the last rendering quantum. |
172 FloatPoint3D m_lastPosition; | 158 FloatPoint3D m_lastPosition; |
173 FloatPoint3D m_lastForward; | 159 FloatPoint3D m_lastForward; |
174 FloatPoint3D m_lastUp; | 160 FloatPoint3D m_lastUp; |
175 | 161 |
176 // Last time that the automations were updated. | 162 // Last time that the automations were updated. |
177 double m_lastUpdateTime; | 163 double m_lastUpdateTime; |
178 | 164 |
179 // Set every rendering quantum if the listener has moved in any way | 165 // Set every rendering quantum if the listener has moved in any way |
180 // (position, forward, or up). This should only be read or written to from | 166 // (position, forward, or up). This should only be read or written to from |
(...skipping 21 matching lines...) Expand all Loading... |
202 // These raw pointers are safe because PannerHandler::uninitialize() | 188 // These raw pointers are safe because PannerHandler::uninitialize() |
203 // unregisters it from m_panners. | 189 // unregisters it from m_panners. |
204 HashSet<PannerHandler*> m_panners; | 190 HashSet<PannerHandler*> m_panners; |
205 // HRTF DB loader for panner node. | 191 // HRTF DB loader for panner node. |
206 RefPtr<HRTFDatabaseLoader> m_hrtfDatabaseLoader; | 192 RefPtr<HRTFDatabaseLoader> m_hrtfDatabaseLoader; |
207 }; | 193 }; |
208 | 194 |
209 } // namespace blink | 195 } // namespace blink |
210 | 196 |
211 #endif // AudioListener_h | 197 #endif // AudioListener_h |
OLD | NEW |