| OLD | NEW |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ExceptionState& exception_state) { | 89 ExceptionState& exception_state) { |
| 90 DCHECK(IsMainThread()); | 90 DCHECK(IsMainThread()); |
| 91 | 91 |
| 92 return Create(context, real->length(), real->Data(), imag->length(), | 92 return Create(context, real->length(), real->Data(), imag->length(), |
| 93 imag->Data(), disable_normalization, exception_state); | 93 imag->Data(), disable_normalization, exception_state); |
| 94 } | 94 } |
| 95 | 95 |
| 96 PeriodicWave* PeriodicWave::Create(BaseAudioContext* context, | 96 PeriodicWave* PeriodicWave::Create(BaseAudioContext* context, |
| 97 const PeriodicWaveOptions& options, | 97 const PeriodicWaveOptions& options, |
| 98 ExceptionState& exception_state) { | 98 ExceptionState& exception_state) { |
| 99 bool normalize = options.hasDisableNormalization() | 99 bool normalize = options.disableNormalization(); |
| 100 ? options.disableNormalization() | |
| 101 : false; | |
| 102 | 100 |
| 103 Vector<float> real_coef; | 101 Vector<float> real_coef; |
| 104 Vector<float> imag_coef; | 102 Vector<float> imag_coef; |
| 105 | 103 |
| 106 if (options.hasReal()) { | 104 if (options.hasReal()) { |
| 107 real_coef = options.real(); | 105 real_coef = options.real(); |
| 108 if (options.hasImag()) | 106 if (options.hasImag()) |
| 109 imag_coef = options.imag(); | 107 imag_coef = options.imag(); |
| 110 else | 108 else |
| 111 imag_coef.Resize(real_coef.size()); | 109 imag_coef.Resize(real_coef.size()); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 395 } |
| 398 | 396 |
| 399 real_p[n] = 0; | 397 real_p[n] = 0; |
| 400 imag_p[n] = b; | 398 imag_p[n] = b; |
| 401 } | 399 } |
| 402 | 400 |
| 403 CreateBandLimitedTables(real_p, imag_p, half_size, false); | 401 CreateBandLimitedTables(real_p, imag_p, half_size, false); |
| 404 } | 402 } |
| 405 | 403 |
| 406 } // namespace blink | 404 } // namespace blink |
| OLD | NEW |