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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ExceptionState& exceptionState) { 62 ExceptionState& exceptionState) {
63 DCHECK(isMainThread()); 63 DCHECK(isMainThread());
64 64
65 if (context.isContextClosed()) { 65 if (context.isContextClosed()) {
66 context.throwExceptionForClosedState(exceptionState); 66 context.throwExceptionForClosedState(exceptionState);
67 return nullptr; 67 return nullptr;
68 } 68 }
69 69
70 if (realLength != imagLength) { 70 if (realLength != imagLength) {
71 exceptionState.throwDOMException( 71 exceptionState.throwDOMException(
72 IndexSizeError, "length of real array (" + String::number(realLength) + 72 IndexSizeError,
73 ") and length of imaginary array (" + 73 "length of real array (" + String::number(realLength) +
74 String::number(imagLength) + ") must match."); 74 ") and length of imaginary array (" + String::number(imagLength) +
75 ") must match.");
75 return nullptr; 76 return nullptr;
76 } 77 }
77 78
78 PeriodicWave* periodicWave = new PeriodicWave(context.sampleRate()); 79 PeriodicWave* periodicWave = new PeriodicWave(context.sampleRate());
79 periodicWave->createBandLimitedTables(real, imag, realLength, 80 periodicWave->createBandLimitedTables(real, imag, realLength,
80 disableNormalization); 81 disableNormalization);
81 return periodicWave; 82 return periodicWave;
82 } 83 }
83 84
84 PeriodicWave* PeriodicWave::create(BaseAudioContext& context, 85 PeriodicWave* PeriodicWave::create(BaseAudioContext& context,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 398 }
398 399
399 realP[n] = 0; 400 realP[n] = 0;
400 imagP[n] = b; 401 imagP[n] = b;
401 } 402 }
402 403
403 createBandLimitedTables(realP, imagP, halfSize, false); 404 createBandLimitedTables(realP, imagP, halfSize, false);
404 } 405 }
405 406
406 } // namespace blink 407 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698