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

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

Issue 1928163002: Add a name attribute for each AudioParam (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation error Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParam.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParam.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698