| 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 29 matching lines...) Expand all Loading... |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 AudioListener::AudioListener() | 42 AudioListener::AudioListener() |
| 43 : m_position(0, 0, 0) | 43 : m_position(0, 0, 0) |
| 44 , m_orientation(0, 0, -1) | 44 , m_orientation(0, 0, -1) |
| 45 , m_upVector(0, 1, 0) | 45 , m_upVector(0, 1, 0) |
| 46 , m_velocity(0, 0, 0) | 46 , m_velocity(0, 0, 0) |
| 47 , m_dopplerFactor(1) | 47 , m_dopplerFactor(1) |
| 48 , m_speedOfSound(343.3) | 48 , m_speedOfSound(343.3) |
| 49 { | 49 { |
| 50 ScriptWrappable::init(this); | |
| 51 } | 50 } |
| 52 | 51 |
| 53 AudioListener::~AudioListener() | 52 AudioListener::~AudioListener() |
| 54 { | 53 { |
| 55 } | 54 } |
| 56 | 55 |
| 57 void AudioListener::trace(Visitor* visitor) | 56 void AudioListener::trace(Visitor* visitor) |
| 58 { | 57 { |
| 59 visitor->trace(m_panners); | 58 visitor->trace(m_panners); |
| 60 visitor->trace(m_hrtfDatabaseLoader); | 59 visitor->trace(m_hrtfDatabaseLoader); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 163 |
| 165 // This synchronizes with panner's process(). | 164 // This synchronizes with panner's process(). |
| 166 MutexLocker listenerLocker(m_listenerLock); | 165 MutexLocker listenerLocker(m_listenerLock); |
| 167 m_speedOfSound = speedOfSound; | 166 m_speedOfSound = speedOfSound; |
| 168 markPannersAsDirty(PannerNode::DopplerRateDirty); | 167 markPannersAsDirty(PannerNode::DopplerRateDirty); |
| 169 } | 168 } |
| 170 | 169 |
| 171 } // namespace blink | 170 } // namespace blink |
| 172 | 171 |
| 173 #endif // ENABLE(WEB_AUDIO) | 172 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |