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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 , m_cachedAzimuth(0) | 58 , m_cachedAzimuth(0) |
59 , m_cachedElevation(0) | 59 , m_cachedElevation(0) |
60 , m_cachedDistanceConeGain(1.0f) | 60 , m_cachedDistanceConeGain(1.0f) |
61 , m_cachedDopplerRate(1) | 61 , m_cachedDopplerRate(1) |
62 , m_connectionCount(0) | 62 , m_connectionCount(0) |
63 { | 63 { |
64 // Load the HRTF database asynchronously so we don't block the Javascript th
read while creating the HRTF database. | 64 // Load the HRTF database asynchronously so we don't block the Javascript th
read while creating the HRTF database. |
65 // The HRTF panner will return zeroes until the database is loaded. | 65 // The HRTF panner will return zeroes until the database is loaded. |
66 listener()->createAndLoadHRTFDatabaseLoader(context->sampleRate()); | 66 listener()->createAndLoadHRTFDatabaseLoader(context->sampleRate()); |
67 | 67 |
68 ScriptWrappable::init(this); | |
69 addInput(); | 68 addInput(); |
70 addOutput(AudioNodeOutput::create(this, 2)); | 69 addOutput(AudioNodeOutput::create(this, 2)); |
71 | 70 |
72 // Node-specific default mixing rules. | 71 // Node-specific default mixing rules. |
73 m_channelCount = 2; | 72 m_channelCount = 2; |
74 m_channelCountMode = ClampedMax; | 73 m_channelCountMode = ClampedMax; |
75 m_channelInterpretation = AudioBus::Speakers; | 74 m_channelInterpretation = AudioBus::Speakers; |
76 | 75 |
77 setNodeType(NodeTypePanner); | 76 setNodeType(NodeTypePanner); |
78 | 77 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 581 |
583 void PannerNode::trace(Visitor* visitor) | 582 void PannerNode::trace(Visitor* visitor) |
584 { | 583 { |
585 visitor->trace(m_panner); | 584 visitor->trace(m_panner); |
586 AudioNode::trace(visitor); | 585 AudioNode::trace(visitor); |
587 } | 586 } |
588 | 587 |
589 } // namespace blink | 588 } // namespace blink |
590 | 589 |
591 #endif // ENABLE(WEB_AUDIO) | 590 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |