| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 double ScriptProcessorHandler::latencyTime() const { | 303 double ScriptProcessorHandler::latencyTime() const { |
| 304 return std::numeric_limits<double>::infinity(); | 304 return std::numeric_limits<double>::infinity(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void ScriptProcessorHandler::setChannelCount(unsigned long channelCount, | 307 void ScriptProcessorHandler::setChannelCount(unsigned long channelCount, |
| 308 ExceptionState& exceptionState) { | 308 ExceptionState& exceptionState) { |
| 309 DCHECK(isMainThread()); | 309 DCHECK(isMainThread()); |
| 310 BaseAudioContext::AutoLocker locker(context()); | 310 BaseAudioContext::AutoLocker locker(context()); |
| 311 | 311 |
| 312 if (channelCount != m_channelCount) { | 312 if (channelCount != m_channelCount) { |
| 313 exceptionState.throwDOMException( | 313 exceptionState.throwDOMException(NotSupportedError, |
| 314 NotSupportedError, "channelCount cannot be changed from " + | 314 "channelCount cannot be changed from " + |
| 315 String::number(m_channelCount) + " to " + | 315 String::number(m_channelCount) + |
| 316 String::number(channelCount)); | 316 " to " + String::number(channelCount)); |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 void ScriptProcessorHandler::setChannelCountMode( | 320 void ScriptProcessorHandler::setChannelCountMode( |
| 321 const String& mode, | 321 const String& mode, |
| 322 ExceptionState& exceptionState) { | 322 ExceptionState& exceptionState) { |
| 323 DCHECK(isMainThread()); | 323 DCHECK(isMainThread()); |
| 324 BaseAudioContext::AutoLocker locker(context()); | 324 BaseAudioContext::AutoLocker locker(context()); |
| 325 | 325 |
| 326 if ((mode == "max") || (mode == "clamped-max")) { | 326 if ((mode == "max") || (mode == "clamped-max")) { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 // If |onaudioprocess| event handler is defined, the node should not be | 481 // If |onaudioprocess| event handler is defined, the node should not be |
| 482 // GCed even if it is out of scope. | 482 // GCed even if it is out of scope. |
| 483 if (hasEventListeners(EventTypeNames::audioprocess)) | 483 if (hasEventListeners(EventTypeNames::audioprocess)) |
| 484 return true; | 484 return true; |
| 485 | 485 |
| 486 return false; | 486 return false; |
| 487 } | 487 } |
| 488 | 488 |
| 489 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |