| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 , m_cachedElevation(0) | 61 , m_cachedElevation(0) |
| 62 , m_cachedDistanceConeGain(1.0f) | 62 , m_cachedDistanceConeGain(1.0f) |
| 63 , m_cachedDopplerRate(1) | 63 , m_cachedDopplerRate(1) |
| 64 , m_connectionCount(0) | 64 , m_connectionCount(0) |
| 65 { | 65 { |
| 66 // Load the HRTF database asynchronously so we don't block the Javascript th
read while creating the HRTF database. | 66 // Load the HRTF database asynchronously so we don't block the Javascript th
read while creating the HRTF database. |
| 67 // The HRTF panner will return zeroes until the database is loaded. | 67 // The HRTF panner will return zeroes until the database is loaded. |
| 68 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNece
ssary(context->sampleRate()); | 68 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNece
ssary(context->sampleRate()); |
| 69 | 69 |
| 70 ScriptWrappable::init(this); | 70 ScriptWrappable::init(this); |
| 71 addInput(adoptPtr(new AudioNodeInput(this))); | 71 addInput(adoptPtrWillBeNoop(new AudioNodeInput(this))); |
| 72 addOutput(adoptPtr(new AudioNodeOutput(this, 2))); | 72 addOutput(adoptPtr(new AudioNodeOutput(this, 2))); |
| 73 | 73 |
| 74 // Node-specific default mixing rules. | 74 // Node-specific default mixing rules. |
| 75 m_channelCount = 2; | 75 m_channelCount = 2; |
| 76 m_channelCountMode = ClampedMax; | 76 m_channelCountMode = ClampedMax; |
| 77 m_channelInterpretation = AudioBus::Speakers; | 77 m_channelInterpretation = AudioBus::Speakers; |
| 78 | 78 |
| 79 setNodeType(NodeTypePanner); | 79 setNodeType(NodeTypePanner); |
| 80 | 80 |
| 81 initialize(); | 81 initialize(); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 notifyAudioSourcesConnectedToNode(connectedNode, visitedNode
s); // recurse | 573 notifyAudioSourcesConnectedToNode(connectedNode, visitedNode
s); // recurse |
| 574 } | 574 } |
| 575 } | 575 } |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace WebCore | 580 } // namespace WebCore |
| 581 | 581 |
| 582 #endif // ENABLE(WEB_AUDIO) | 582 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |