| OLD | NEW |
| 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 * 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 // playing. Stop the node now and deref it. (But don't run the onEnd
ed event because the | 576 // playing. Stop the node now and deref it. (But don't run the onEnd
ed event because the |
| 577 // source never actually played.) | 577 // source never actually played.) |
| 578 finishWithoutOnEnded(); | 578 finishWithoutOnEnded(); |
| 579 } | 579 } |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 | 582 |
| 583 // ---------------------------------------------------------------- | 583 // ---------------------------------------------------------------- |
| 584 AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, floa
t sampleRate) | 584 AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, floa
t sampleRate) |
| 585 : AudioScheduledSourceNode(context) | 585 : AudioScheduledSourceNode(context) |
| 586 , m_playbackRate(AudioParam::create(context, 1.0)) | 586 , m_playbackRate(AudioParam::create(context, ParamTypeAudioBufferSourcePlayb
ackRate, 1.0)) |
| 587 , m_detune(AudioParam::create(context, 0.0)) | 587 , m_detune(AudioParam::create(context, ParamTypeAudioBufferSourceDetune, 0.0
)) |
| 588 { | 588 { |
| 589 setHandler(AudioBufferSourceHandler::create(*this, sampleRate, m_playbackRat
e->handler(), m_detune->handler())); | 589 setHandler(AudioBufferSourceHandler::create(*this, sampleRate, m_playbackRat
e->handler(), m_detune->handler())); |
| 590 } | 590 } |
| 591 | 591 |
| 592 AudioBufferSourceNode* AudioBufferSourceNode::create(AbstractAudioContext& conte
xt, float sampleRate) | 592 AudioBufferSourceNode* AudioBufferSourceNode::create(AbstractAudioContext& conte
xt, float sampleRate) |
| 593 { | 593 { |
| 594 return new AudioBufferSourceNode(context, sampleRate); | 594 return new AudioBufferSourceNode(context, sampleRate); |
| 595 } | 595 } |
| 596 | 596 |
| 597 DEFINE_TRACE(AudioBufferSourceNode) | 597 DEFINE_TRACE(AudioBufferSourceNode) |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 { | 670 { |
| 671 audioBufferSourceHandler().start(when, grainOffset, exceptionState); | 671 audioBufferSourceHandler().start(when, grainOffset, exceptionState); |
| 672 } | 672 } |
| 673 | 673 |
| 674 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD
uration, ExceptionState& exceptionState) | 674 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD
uration, ExceptionState& exceptionState) |
| 675 { | 675 { |
| 676 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception
State); | 676 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception
State); |
| 677 } | 677 } |
| 678 | 678 |
| 679 } // namespace blink | 679 } // namespace blink |
| OLD | NEW |