| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // initialize() and uninitialize(). | 64 // initialize() and uninitialize(). |
| 65 AudioContext::AutoLocker contextLocker(context()); | 65 AudioContext::AutoLocker contextLocker(context()); |
| 66 | 66 |
| 67 if (type == "none") | 67 if (type == "none") |
| 68 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone
); | 68 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone
); |
| 69 else if (type == "2x") | 69 else if (type == "2x") |
| 70 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x); | 70 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x); |
| 71 else if (type == "4x") | 71 else if (type == "4x") |
| 72 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x); | 72 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x); |
| 73 else | 73 else |
| 74 es.throwDOMException(InvalidStateError); | 74 es.throwUninformativeAndGenericDOMException(InvalidStateError); |
| 75 } | 75 } |
| 76 | 76 |
| 77 String WaveShaperNode::oversample() const | 77 String WaveShaperNode::oversample() const |
| 78 { | 78 { |
| 79 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample
()) { | 79 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample
()) { |
| 80 case WaveShaperProcessor::OverSampleNone: | 80 case WaveShaperProcessor::OverSampleNone: |
| 81 return "none"; | 81 return "none"; |
| 82 case WaveShaperProcessor::OverSample2x: | 82 case WaveShaperProcessor::OverSample2x: |
| 83 return "2x"; | 83 return "2x"; |
| 84 case WaveShaperProcessor::OverSample4x: | 84 case WaveShaperProcessor::OverSample4x: |
| 85 return "4x"; | 85 return "4x"; |
| 86 default: | 86 default: |
| 87 ASSERT_NOT_REACHED(); | 87 ASSERT_NOT_REACHED(); |
| 88 return "none"; | 88 return "none"; |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace WebCore | 92 } // namespace WebCore |
| 93 | 93 |
| 94 #endif // ENABLE(WEB_AUDIO) | 94 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |