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

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

Issue 2803073002: Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Removing DCHECK_IS_ON from FFTFrameOpenMAXDLAndroid.cpp 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) 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 * 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 unsigned j = (i + InterpolationFactor); 69 unsigned j = (i + InterpolationFactor);
70 if (j >= NumberOfTotalElevations) 70 if (j >= NumberOfTotalElevations)
71 j = i; // for last elevation interpolate with itself 71 j = i; // for last elevation interpolate with itself
72 72
73 // Create the interpolated convolution kernels and delays. 73 // Create the interpolated convolution kernels and delays.
74 for (unsigned jj = 1; jj < InterpolationFactor; ++jj) { 74 for (unsigned jj = 1; jj < InterpolationFactor; ++jj) {
75 float x = 75 float x =
76 static_cast<float>(jj) / static_cast<float>(InterpolationFactor); 76 static_cast<float>(jj) / static_cast<float>(InterpolationFactor);
77 m_elevations[i + jj] = HRTFElevation::createByInterpolatingSlices( 77 m_elevations[i + jj] = HRTFElevation::createByInterpolatingSlices(
78 m_elevations[i].get(), m_elevations[j].get(), x, sampleRate); 78 m_elevations[i].get(), m_elevations[j].get(), x, sampleRate);
79 ASSERT(m_elevations[i + jj].get()); 79 DCHECK(m_elevations[i + jj].get());
80 } 80 }
81 } 81 }
82 } 82 }
83 } 83 }
84 84
85 void HRTFDatabase::getKernelsFromAzimuthElevation(double azimuthBlend, 85 void HRTFDatabase::getKernelsFromAzimuthElevation(double azimuthBlend,
86 unsigned azimuthIndex, 86 unsigned azimuthIndex,
87 double elevationAngle, 87 double elevationAngle,
88 HRTFKernel*& kernelL, 88 HRTFKernel*& kernelL,
89 HRTFKernel*& kernelR, 89 HRTFKernel*& kernelR,
(...skipping 29 matching lines...) Expand all
119 elevationAngle = 119 elevationAngle =
120 clampTo<double, double>(elevationAngle, MinElevation, MaxElevation); 120 clampTo<double, double>(elevationAngle, MinElevation, MaxElevation);
121 121
122 unsigned elevationIndex = 122 unsigned elevationIndex =
123 static_cast<int>(InterpolationFactor * (elevationAngle - MinElevation) / 123 static_cast<int>(InterpolationFactor * (elevationAngle - MinElevation) /
124 RawElevationAngleSpacing); 124 RawElevationAngleSpacing);
125 return elevationIndex; 125 return elevationIndex;
126 } 126 }
127 127
128 } // namespace blink 128 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698