Chromium Code Reviews| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 { | 504 { |
| 505 m_channelCountMode = m_newChannelCountMode; | 505 m_channelCountMode = m_newChannelCountMode; |
| 506 updateChannelsForInputs(); | 506 updateChannelsForInputs(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 unsigned AudioHandler::numberOfOutputChannels() const | 509 unsigned AudioHandler::numberOfOutputChannels() const |
| 510 { | 510 { |
| 511 // This should only be called for ScriptProcessorNodes which are the only no des where you can | 511 // This should only be called for ScriptProcessorNodes which are the only no des where you can |
| 512 // have an output with 0 channels. All other nodes have have at least one o utput channel, so | 512 // have an output with 0 channels. All other nodes have have at least one o utput channel, so |
| 513 // there's no reason other nodes should ever call this function. | 513 // there's no reason other nodes should ever call this function. |
| 514 ASSERT_WITH_MESSAGE(1, "numberOfOutputChannels() not valid for node type %d" , getNodeType()); | 514 DCHECK(1) << "numberOfOutputChannels() not valid for node type " << getNodeT ype(); |
|
tkent
2016/03/23 02:23:53
rtoy,
The original code looks weird. ASSERT(1) me
Raymond Toy
2016/03/23 19:31:52
Yeah, that's wrong. This CL has landed so I'll fi
| |
| 515 return 1; | 515 return 1; |
| 516 } | 516 } |
| 517 // ---------------------------------------------------------------- | 517 // ---------------------------------------------------------------- |
| 518 | 518 |
| 519 AudioNode::AudioNode(AbstractAudioContext& context) | 519 AudioNode::AudioNode(AbstractAudioContext& context) |
| 520 : m_context(context) | 520 : m_context(context) |
| 521 , m_handler(nullptr) | 521 , m_handler(nullptr) |
| 522 { | 522 { |
| 523 ThreadState::current()->registerPreFinalizer(this); | 523 ThreadState::current()->registerPreFinalizer(this); |
| 524 } | 524 } |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 933 void AudioNode::didAddOutput(unsigned numberOfOutputs) | 933 void AudioNode::didAddOutput(unsigned numberOfOutputs) |
| 934 { | 934 { |
| 935 m_connectedNodes.append(nullptr); | 935 m_connectedNodes.append(nullptr); |
| 936 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size()); | 936 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size()); |
| 937 m_connectedParams.append(nullptr); | 937 m_connectedParams.append(nullptr); |
| 938 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size()); | 938 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size()); |
| 939 } | 939 } |
| 940 | 940 |
| 941 } // namespace blink | 941 } // namespace blink |
| 942 | 942 |
| OLD | NEW |