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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years 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
« no previous file with comments | « Source/modules/webaudio/AudioBufferCallback.h ('k') | Source/modules/webaudio/AudioContext.cpp » ('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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 float sampleRate() const { return m_destinationNode->sampleRate(); } 106 float sampleRate() const { return m_destinationNode->sampleRate(); }
107 unsigned long activeSourceCount() const { return static_cast<unsigned long>( m_activeSourceCount); } 107 unsigned long activeSourceCount() const { return static_cast<unsigned long>( m_activeSourceCount); }
108 108
109 void incrementActiveSourceCount(); 109 void incrementActiveSourceCount();
110 void decrementActiveSourceCount(); 110 void decrementActiveSourceCount();
111 111
112 PassRefPtr<AudioBuffer> createBuffer(unsigned numberOfChannels, size_t numbe rOfFrames, float sampleRate, ExceptionState&); 112 PassRefPtr<AudioBuffer> createBuffer(unsigned numberOfChannels, size_t numbe rOfFrames, float sampleRate, ExceptionState&);
113 PassRefPtr<AudioBuffer> createBuffer(ArrayBuffer*, bool mixToMono, Exception State&); 113 PassRefPtr<AudioBuffer> createBuffer(ArrayBuffer*, bool mixToMono, Exception State&);
114 114
115 // Asynchronous audio file data decoding. 115 // Asynchronous audio file data decoding.
116 void decodeAudioData(ArrayBuffer*, PassRefPtr<AudioBufferCallback>, PassRefP tr<AudioBufferCallback>, ExceptionState&); 116 void decodeAudioData(ArrayBuffer*, PassOwnPtr<AudioBufferCallback>, PassOwnP tr<AudioBufferCallback>, ExceptionState&);
117 117
118 AudioListener* listener() { return m_listener.get(); } 118 AudioListener* listener() { return m_listener.get(); }
119 119
120 // The AudioNode create methods are called on the main thread (from JavaScri pt). 120 // The AudioNode create methods are called on the main thread (from JavaScri pt).
121 PassRefPtr<AudioBufferSourceNode> createBufferSource(); 121 PassRefPtr<AudioBufferSourceNode> createBufferSource();
122 PassRefPtr<MediaElementAudioSourceNode> createMediaElementSource(HTMLMediaEl ement*, ExceptionState&); 122 PassRefPtr<MediaElementAudioSourceNode> createMediaElementSource(HTMLMediaEl ement*, ExceptionState&);
123 PassRefPtr<MediaStreamAudioSourceNode> createMediaStreamSource(MediaStream*, ExceptionState&); 123 PassRefPtr<MediaStreamAudioSourceNode> createMediaStreamSource(MediaStream*, ExceptionState&);
124 PassRefPtr<MediaStreamAudioDestinationNode> createMediaStreamDestination(); 124 PassRefPtr<MediaStreamAudioDestinationNode> createMediaStreamDestination();
125 PassRefPtr<GainNode> createGain(); 125 PassRefPtr<GainNode> createGain();
126 PassRefPtr<BiquadFilterNode> createBiquadFilter(); 126 PassRefPtr<BiquadFilterNode> createBiquadFilter();
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // It is somewhat arbitrary and could be increased if necessary. 337 // It is somewhat arbitrary and could be increased if necessary.
338 enum { MaxNumberOfChannels = 32 }; 338 enum { MaxNumberOfChannels = 32 };
339 339
340 // Number of AudioBufferSourceNodes that are active (playing). 340 // Number of AudioBufferSourceNodes that are active (playing).
341 int m_activeSourceCount; 341 int m_activeSourceCount;
342 }; 342 };
343 343
344 } // WebCore 344 } // WebCore
345 345
346 #endif // AudioContext_h 346 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferCallback.h ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698