| OLD | NEW |
| 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 ExceptionState& exception_state) { | 59 ExceptionState& exception_state) { |
| 60 WaveShaperNode* node = Create(*context, exception_state); | 60 WaveShaperNode* node = Create(*context, exception_state); |
| 61 | 61 |
| 62 if (!node) | 62 if (!node) |
| 63 return nullptr; | 63 return nullptr; |
| 64 | 64 |
| 65 node->HandleChannelOptions(options, exception_state); | 65 node->HandleChannelOptions(options, exception_state); |
| 66 | 66 |
| 67 if (options.hasCurve()) | 67 if (options.hasCurve()) |
| 68 node->setCurve(options.curve(), exception_state); | 68 node->setCurve(options.curve(), exception_state); |
| 69 if (options.hasOversample()) | 69 |
| 70 node->setOversample(options.oversample()); | 70 node->setOversample(options.oversample()); |
| 71 | 71 |
| 72 return node; | 72 return node; |
| 73 } | 73 } |
| 74 WaveShaperProcessor* WaveShaperNode::GetWaveShaperProcessor() const { | 74 WaveShaperProcessor* WaveShaperNode::GetWaveShaperProcessor() const { |
| 75 return static_cast<WaveShaperProcessor*>( | 75 return static_cast<WaveShaperProcessor*>( |
| 76 static_cast<AudioBasicProcessorHandler&>(Handler()).Processor()); | 76 static_cast<AudioBasicProcessorHandler&>(Handler()).Processor()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void WaveShaperNode::SetCurveImpl(const float* curve_data, | 79 void WaveShaperNode::SetCurveImpl(const float* curve_data, |
| 80 unsigned curve_length, | 80 unsigned curve_length, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return "2x"; | 152 return "2x"; |
| 153 case WaveShaperProcessor::kOverSample4x: | 153 case WaveShaperProcessor::kOverSample4x: |
| 154 return "4x"; | 154 return "4x"; |
| 155 default: | 155 default: |
| 156 ASSERT_NOT_REACHED(); | 156 ASSERT_NOT_REACHED(); |
| 157 return "none"; | 157 return "none"; |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |