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

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

Issue 26883005: Get rid of custom bindings for AudioBufferSourceNode.buffer setter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class AudioBufferSourceNode : public AudioScheduledSourceNode { 45 class AudioBufferSourceNode : public AudioScheduledSourceNode {
46 public: 46 public:
47 static PassRefPtr<AudioBufferSourceNode> create(AudioContext*, float sampleR ate); 47 static PassRefPtr<AudioBufferSourceNode> create(AudioContext*, float sampleR ate);
48 48
49 virtual ~AudioBufferSourceNode(); 49 virtual ~AudioBufferSourceNode();
50 50
51 // AudioNode 51 // AudioNode
52 virtual void process(size_t framesToProcess); 52 virtual void process(size_t framesToProcess);
53 virtual void reset(); 53 virtual void reset();
54 54
55 // setBuffer() is called on the main thread. This is the buffer we use for playback. 55 // setBuffer() is called on the main thread. This is the buffer we use for p layback.
56 // returns true on success. 56 void setBuffer(AudioBuffer*, ExceptionState&);
57 bool setBuffer(AudioBuffer*);
58 AudioBuffer* buffer() { return m_buffer.get(); } 57 AudioBuffer* buffer() { return m_buffer.get(); }
59 58
60 // numberOfChannels() returns the number of output channels. This value equ als the number of channels from the buffer. 59 // numberOfChannels() returns the number of output channels. This value equ als the number of channels from the buffer.
61 // If a new buffer is set with a different number of channels, then this val ue will dynamically change. 60 // If a new buffer is set with a different number of channels, then this val ue will dynamically change.
62 unsigned numberOfChannels(); 61 unsigned numberOfChannels();
63 62
64 // Play-state 63 // Play-state
65 void startGrain(double when, double grainOffset); 64 void startGrain(double when, double grainOffset);
66 void startGrain(double when, double grainOffset, double grainDuration); 65 void startGrain(double when, double grainOffset, double grainDuration);
67 66
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // the pitch rate. We manually manage ref-counting because we want to use Re fTypeConnection. 138 // the pitch rate. We manually manage ref-counting because we want to use Re fTypeConnection.
140 PannerNode* m_pannerNode; 139 PannerNode* m_pannerNode;
141 140
142 // This synchronizes process() with setBuffer() which can cause dynamic chan nel count changes. 141 // This synchronizes process() with setBuffer() which can cause dynamic chan nel count changes.
143 mutable Mutex m_processLock; 142 mutable Mutex m_processLock;
144 }; 143 };
145 144
146 } // namespace WebCore 145 } // namespace WebCore
147 146
148 #endif // AudioBufferSourceNode_h 147 #endif // AudioBufferSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698