| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 IndexSizeError, | 373 IndexSizeError, |
| 374 "number of input channels (" + String::number(numberOfInputChannels) | 374 "number of input channels (" + String::number(numberOfInputChannels) |
| 375 + ") exceeds maximum (" | 375 + ") exceeds maximum (" |
| 376 + String::number(BaseAudioContext::maxNumberOfChannels()) + ")."); | 376 + String::number(BaseAudioContext::maxNumberOfChannels()) + ")."); |
| 377 return nullptr; | 377 return nullptr; |
| 378 } | 378 } |
| 379 | 379 |
| 380 if (numberOfOutputChannels > BaseAudioContext::maxNumberOfChannels()) { | 380 if (numberOfOutputChannels > BaseAudioContext::maxNumberOfChannels()) { |
| 381 exceptionState.throwDOMException( | 381 exceptionState.throwDOMException( |
| 382 IndexSizeError, | 382 IndexSizeError, |
| 383 "number of output channels (" + String::number(numberOfInputChannels
) | 383 "number of output channels (" + String::number(numberOfOutputChannel
s) |
| 384 + ") exceeds maximum (" | 384 + ") exceeds maximum (" |
| 385 + String::number(BaseAudioContext::maxNumberOfChannels()) + ")."); | 385 + String::number(BaseAudioContext::maxNumberOfChannels()) + ")."); |
| 386 return nullptr; | 386 return nullptr; |
| 387 } | 387 } |
| 388 | 388 |
| 389 // Check for valid buffer size. | 389 // Check for valid buffer size. |
| 390 switch (bufferSize) { | 390 switch (bufferSize) { |
| 391 case 0: | 391 case 0: |
| 392 bufferSize = chooseBufferSize(); | 392 bufferSize = chooseBufferSize(); |
| 393 break; | 393 break; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 // If |onaudioprocess| event handler is defined, the node should not be | 432 // If |onaudioprocess| event handler is defined, the node should not be |
| 433 // GCed even if it is out of scope. | 433 // GCed even if it is out of scope. |
| 434 if (hasEventListeners(EventTypeNames::audioprocess)) | 434 if (hasEventListeners(EventTypeNames::audioprocess)) |
| 435 return true; | 435 return true; |
| 436 | 436 |
| 437 return false; | 437 return false; |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace blink | 440 } // namespace blink |
| 441 | 441 |
| OLD | NEW |