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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "config.h" | 29 #include "config.h" |
30 | 30 |
31 #if ENABLE(WEB_AUDIO) | 31 #if ENABLE(WEB_AUDIO) |
32 | 32 |
33 #include "modules/webaudio/AudioListener.h" | 33 #include "modules/webaudio/AudioListener.h" |
34 | 34 |
35 #include "modules/webaudio/PannerNode.h" | 35 #include "modules/webaudio/PannerNode.h" |
36 #include "platform/audio/AudioBus.h" | 36 #include "platform/audio/AudioBus.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace blink { |
39 | 39 |
40 AudioListener::AudioListener() | 40 AudioListener::AudioListener() |
41 : m_position(0, 0, 0) | 41 : m_position(0, 0, 0) |
42 , m_orientation(0, 0, -1) | 42 , m_orientation(0, 0, -1) |
43 , m_upVector(0, 1, 0) | 43 , m_upVector(0, 1, 0) |
44 , m_velocity(0, 0, 0) | 44 , m_velocity(0, 0, 0) |
45 , m_dopplerFactor(1) | 45 , m_dopplerFactor(1) |
46 , m_speedOfSound(343.3) | 46 , m_speedOfSound(343.3) |
47 { | 47 { |
48 ScriptWrappable::init(this); | 48 ScriptWrappable::init(this); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 { | 136 { |
137 if (m_speedOfSound == speedOfSound) | 137 if (m_speedOfSound == speedOfSound) |
138 return; | 138 return; |
139 | 139 |
140 // This synchronizes with panner's process(). | 140 // This synchronizes with panner's process(). |
141 MutexLocker listenerLocker(m_listenerLock); | 141 MutexLocker listenerLocker(m_listenerLock); |
142 m_speedOfSound = speedOfSound; | 142 m_speedOfSound = speedOfSound; |
143 markPannersAsDirty(PannerNode::DopplerRateDirty); | 143 markPannersAsDirty(PannerNode::DopplerRateDirty); |
144 } | 144 } |
145 | 145 |
146 } // namespace WebCore | 146 } // namespace blink |
147 | 147 |
148 #endif // ENABLE(WEB_AUDIO) | 148 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |