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

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

Issue 2604683002: Remove ASSERT_NOT_REACHED() in audio. (Closed)
Patch Set: fixed. Created 3 years, 11 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (numberOfSourceChannels > 1) 114 if (numberOfSourceChannels > 1)
115 m_sourceChannels[1] = sourceBus->channel(1)->data(); 115 m_sourceChannels[1] = sourceBus->channel(1)->data();
116 else 116 else
117 // Simply duplicate mono channel input data to right channel for stereo 117 // Simply duplicate mono channel input data to right channel for stereo
118 // processing. 118 // processing.
119 m_sourceChannels[1] = m_sourceChannels[0]; 119 m_sourceChannels[1] = m_sourceChannels[0];
120 120
121 break; 121 break;
122 default: 122 default:
123 // FIXME : support other number of channels. 123 // FIXME : support other number of channels.
124 ASSERT_NOT_REACHED(); 124 NOTREACHED();
125 destinationBus->zero(); 125 destinationBus->zero();
126 return; 126 return;
127 } 127 }
128 128
129 for (unsigned i = 0; i < numberOfChannels; ++i) 129 for (unsigned i = 0; i < numberOfChannels; ++i)
130 m_destinationChannels[i] = destinationBus->channel(i)->mutableData(); 130 m_destinationChannels[i] = destinationBus->channel(i)->mutableData();
131 131
132 float filterStageGain = parameterValue(ParamFilterStageGain); 132 float filterStageGain = parameterValue(ParamFilterStageGain);
133 float filterStageRatio = parameterValue(ParamFilterStageRatio); 133 float filterStageRatio = parameterValue(ParamFilterStageRatio);
134 float anchor = parameterValue(ParamFilterAnchor); 134 float anchor = parameterValue(ParamFilterAnchor);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 void DynamicsCompressor::setNumberOfChannels(unsigned numberOfChannels) { 185 void DynamicsCompressor::setNumberOfChannels(unsigned numberOfChannels) {
186 m_sourceChannels = wrapArrayUnique(new const float*[numberOfChannels]); 186 m_sourceChannels = wrapArrayUnique(new const float*[numberOfChannels]);
187 m_destinationChannels = wrapArrayUnique(new float*[numberOfChannels]); 187 m_destinationChannels = wrapArrayUnique(new float*[numberOfChannels]);
188 188
189 m_compressor.setNumberOfChannels(numberOfChannels); 189 m_compressor.setNumberOfChannels(numberOfChannels);
190 m_numberOfChannels = numberOfChannels; 190 m_numberOfChannels = numberOfChannels;
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/audio/Distance.cpp ('k') | third_party/WebKit/Source/platform/audio/FFTFrameStub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698