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