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

Side by Side Diff: third_party/WebKit/Source/platform/audio/MultiChannelResampler.cpp

Issue 2807593003: Revert of Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Created 3 years, 8 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // All channels must ask for the same amount. This should always be the 68 // All channels must ask for the same amount. This should always be the
69 // case, but let's just make sure. 69 // case, but let's just make sure.
70 bool isGood = 70 bool isGood =
71 m_multiChannelBus.get() && framesToProcess == m_framesToProcess; 71 m_multiChannelBus.get() && framesToProcess == m_framesToProcess;
72 DCHECK(isGood); 72 DCHECK(isGood);
73 if (!isGood) 73 if (!isGood)
74 return; 74 return;
75 75
76 // Copy the channel data from what we received from m_multiChannelProvider. 76 // Copy the channel data from what we received from m_multiChannelProvider.
77 DCHECK_LE(m_currentChannel, m_numberOfChannels); 77 ASSERT(m_currentChannel <= m_numberOfChannels);
78 if (m_currentChannel < m_numberOfChannels) { 78 if (m_currentChannel < m_numberOfChannels) {
79 memcpy(bus->channel(0)->mutableData(), 79 memcpy(bus->channel(0)->mutableData(),
80 m_multiChannelBus->channel(m_currentChannel)->data(), 80 m_multiChannelBus->channel(m_currentChannel)->data(),
81 sizeof(float) * framesToProcess); 81 sizeof(float) * framesToProcess);
82 ++m_currentChannel; 82 ++m_currentChannel;
83 } 83 }
84 } 84 }
85 85
86 private: 86 private:
87 AudioSourceProvider* m_multiChannelProvider; 87 AudioSourceProvider* m_multiChannelProvider;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // calls provideInput() for the first channel, then it will call it for the 120 // calls provideInput() for the first channel, then it will call it for the
121 // remaining channels, since they all buffer in the same way and are 121 // remaining channels, since they all buffer in the same way and are
122 // processing the same number of frames. 122 // processing the same number of frames.
123 m_kernels[channelIndex]->process( 123 m_kernels[channelIndex]->process(
124 &channelProvider, destination->channel(channelIndex)->mutableData(), 124 &channelProvider, destination->channel(channelIndex)->mutableData(),
125 framesToProcess); 125 framesToProcess);
126 } 126 }
127 } 127 }
128 128
129 } // namespace blink 129 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698