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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 m_analyser.setSmoothingTimeConstant(k); | 109 m_analyser.setSmoothingTimeConstant(k); |
110 } else { | 110 } else { |
111 exceptionState.throwDOMException( | 111 exceptionState.throwDOMException( |
112 IndexSizeError, | 112 IndexSizeError, |
113 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0, Exce
ptionMessages::InclusiveBound, 1.0, ExceptionMessages::InclusiveBound)); | 113 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0, Exce
ptionMessages::InclusiveBound, 1.0, ExceptionMessages::InclusiveBound)); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 // ---------------------------------------------------------------- | 117 // ---------------------------------------------------------------- |
118 | 118 |
119 AnalyserNode::AnalyserNode(AudioContext& context, float sampleRate) | 119 AnalyserNode::AnalyserNode(AbstractAudioContext& context, float sampleRate) |
120 : AudioBasicInspectorNode(context) | 120 : AudioBasicInspectorNode(context) |
121 { | 121 { |
122 setHandler(AnalyserHandler::create(*this, sampleRate)); | 122 setHandler(AnalyserHandler::create(*this, sampleRate)); |
123 } | 123 } |
124 | 124 |
125 AnalyserNode* AnalyserNode::create(AudioContext& context, float sampleRate) | 125 AnalyserNode* AnalyserNode::create(AbstractAudioContext& context, float sampleRa
te) |
126 { | 126 { |
127 return new AnalyserNode(context, sampleRate); | 127 return new AnalyserNode(context, sampleRate); |
128 } | 128 } |
129 | 129 |
130 AnalyserHandler& AnalyserNode::analyserHandler() const | 130 AnalyserHandler& AnalyserNode::analyserHandler() const |
131 { | 131 { |
132 return static_cast<AnalyserHandler&>(handler()); | 132 return static_cast<AnalyserHandler&>(handler()); |
133 } | 133 } |
134 | 134 |
135 unsigned AnalyserNode::fftSize() const | 135 unsigned AnalyserNode::fftSize() const |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 | 194 |
195 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) | 195 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) |
196 { | 196 { |
197 analyserHandler().getByteTimeDomainData(array); | 197 analyserHandler().getByteTimeDomainData(array); |
198 } | 198 } |
199 | 199 |
200 } // namespace blink | 200 } // namespace blink |
201 | 201 |
202 #endif // ENABLE(WEB_AUDIO) | 202 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |