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

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

Issue 23596014: Keep AudioScheduledSourceNode alive until onended is called. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 3 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 | Annotate | Revision Log
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 { 68 {
69 ScriptWrappable::init(this); 69 ScriptWrappable::init(this);
70 setNodeType(NodeTypeAudioBufferSource); 70 setNodeType(NodeTypeAudioBufferSource);
71 71
72 m_gain = AudioParam::create(context, "gain", 1.0, 0.0, 1.0); 72 m_gain = AudioParam::create(context, "gain", 1.0, 0.0, 1.0);
73 m_playbackRate = AudioParam::create(context, "playbackRate", 1.0, 0.0, MaxRa te); 73 m_playbackRate = AudioParam::create(context, "playbackRate", 1.0, 0.0, MaxRa te);
74 74
75 // Default to mono. A call to setBuffer() will set the number of output cha nnels to that of the buffer. 75 // Default to mono. A call to setBuffer() will set the number of output cha nnels to that of the buffer.
76 addOutput(adoptPtr(new AudioNodeOutput(this, 1))); 76 addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
77 77
78 suspendIfNeeded();
78 initialize(); 79 initialize();
79 } 80 }
80 81
81 AudioBufferSourceNode::~AudioBufferSourceNode() 82 AudioBufferSourceNode::~AudioBufferSourceNode()
82 { 83 {
83 clearPannerNode(); 84 clearPannerNode();
84 uninitialize(); 85 uninitialize();
85 } 86 }
86 87
87 void AudioBufferSourceNode::process(size_t framesToProcess) 88 void AudioBufferSourceNode::process(size_t framesToProcess)
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 void AudioBufferSourceNode::finish() 480 void AudioBufferSourceNode::finish()
480 { 481 {
481 clearPannerNode(); 482 clearPannerNode();
482 ASSERT(!m_pannerNode); 483 ASSERT(!m_pannerNode);
483 AudioScheduledSourceNode::finish(); 484 AudioScheduledSourceNode::finish();
484 } 485 }
485 486
486 } // namespace WebCore 487 } // namespace WebCore
487 488
488 #endif // ENABLE(WEB_AUDIO) 489 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioBufferSourceNode.idl » ('j') | Source/modules/webaudio/AudioScheduledSourceNode.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698