| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void set(AudioBus* bus) | 69 void set(AudioBus* bus) |
| 70 { | 70 { |
| 71 if (bus) | 71 if (bus) |
| 72 m_sourceBus->copyFrom(*bus); | 72 m_sourceBus->copyFrom(*bus); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // AudioSourceProvider. | 75 // AudioSourceProvider. |
| 76 void provideInput(AudioBus* destinationBus, size_t numberOfFrames) overr
ide | 76 void provideInput(AudioBus* destinationBus, size_t numberOfFrames) overr
ide |
| 77 { | 77 { |
| 78 bool isGood = destinationBus && destinationBus->length() == numberOf
Frames && m_sourceBus->length() == numberOfFrames; | 78 bool isGood = destinationBus && destinationBus->length() == numberOf
Frames && m_sourceBus->length() == numberOfFrames; |
| 79 ASSERT(isGood); | 79 DCHECK(isGood); |
| 80 if (isGood) | 80 if (isGood) |
| 81 destinationBus->copyFrom(*m_sourceBus); | 81 destinationBus->copyFrom(*m_sourceBus); |
| 82 } | 82 } |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 RefPtr<AudioBus> m_sourceBus; | 85 RefPtr<AudioBus> m_sourceBus; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 // Counts the number of sample-frames processed by the destination. | 88 // Counts the number of sample-frames processed by the destination. |
| 89 size_t m_currentSampleFrame; | 89 size_t m_currentSampleFrame; |
| 90 | 90 |
| 91 LocalAudioInputProvider m_localAudioInputProvider; | 91 LocalAudioInputProvider m_localAudioInputProvider; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class AudioDestinationNode : public AudioNode { | 94 class AudioDestinationNode : public AudioNode { |
| 95 DEFINE_WRAPPERTYPEINFO(); | 95 DEFINE_WRAPPERTYPEINFO(); |
| 96 public: | 96 public: |
| 97 AudioDestinationHandler& audioDestinationHandler() const; | 97 AudioDestinationHandler& audioDestinationHandler() const; |
| 98 | 98 |
| 99 unsigned long maxChannelCount() const; | 99 unsigned long maxChannelCount() const; |
| 100 | 100 |
| 101 protected: | 101 protected: |
| 102 AudioDestinationNode(AbstractAudioContext&); | 102 AudioDestinationNode(AbstractAudioContext&); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // AudioDestinationNode_h | 107 #endif // AudioDestinationNode_h |
| OLD | NEW |