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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 // PannerNode is an AudioNode with one input and one output. | 39 // PannerNode is an AudioNode with one input and one output. |
40 // It positions a sound in 3D space, with the exact effect dependent on the pann
ing model. | 40 // It positions a sound in 3D space, with the exact effect dependent on the pann
ing model. |
41 // It has a position and an orientation in 3D space which is relative to the pos
ition and orientation of the context's AudioListener. | 41 // It has a position and an orientation in 3D space which is relative to the pos
ition and orientation of the context's AudioListener. |
42 // A distance effect will attenuate the gain as the position moves away from the
listener. | 42 // A distance effect will attenuate the gain as the position moves away from the
listener. |
43 // A cone effect will attenuate the gain as the orientation moves away from the
listener. | 43 // A cone effect will attenuate the gain as the orientation moves away from the
listener. |
44 // All of these effects follow the OpenAL specification very closely. | 44 // All of these effects follow the OpenAL specification very closely. |
45 | 45 |
46 class PannerNode FINAL : public AudioNode { | 46 class PannerNode FINAL : public AudioNode { |
| 47 DEFINE_WRAPPERTYPEINFO(); |
47 public: | 48 public: |
48 // These enums are used to distinguish what cached values of panner are dirt
y. | 49 // These enums are used to distinguish what cached values of panner are dirt
y. |
49 enum { | 50 enum { |
50 AzimuthElevationDirty = 0x1, | 51 AzimuthElevationDirty = 0x1, |
51 DistanceConeGainDirty = 0x2, | 52 DistanceConeGainDirty = 0x2, |
52 DopplerRateDirty = 0x4, | 53 DopplerRateDirty = 0x4, |
53 }; | 54 }; |
54 | 55 |
55 static PannerNode* create(AudioContext* context, float sampleRate) | 56 static PannerNode* create(AudioContext* context, float sampleRate) |
56 { | 57 { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // AudioContext's connection count | 160 // AudioContext's connection count |
160 unsigned m_connectionCount; | 161 unsigned m_connectionCount; |
161 | 162 |
162 // Synchronize process() with setting of the panning model, source's locatio
n information, listener, distance parameters and sound cones. | 163 // Synchronize process() with setting of the panning model, source's locatio
n information, listener, distance parameters and sound cones. |
163 mutable Mutex m_processLock; | 164 mutable Mutex m_processLock; |
164 }; | 165 }; |
165 | 166 |
166 } // namespace blink | 167 } // namespace blink |
167 | 168 |
168 #endif // PannerNode_h | 169 #endif // PannerNode_h |
OLD | NEW |