Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h

Issue 2159403002: Replace ASSERT with DCHECK in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
Raymond Toy 2016/07/25 16:56:52 Not for this CL, but I think it would be good if w
HyungwookLee 2016/07/26 00:42:40 That's good idea to make sure each part of 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(BaseAudioContext&); 102 AudioDestinationNode(BaseAudioContext&);
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // AudioDestinationNode_h 107 #endif // AudioDestinationNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698