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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual bool hasPendingActivity() const OVERRIDE; | 92 virtual bool hasPendingActivity() const OVERRIDE; |
93 | 93 |
94 AudioDestinationNode* destination() { return m_destinationNode.get(); } | 94 AudioDestinationNode* destination() { return m_destinationNode.get(); } |
95 size_t currentSampleFrame() const { return m_destinationNode->currentSampleF
rame(); } | 95 size_t currentSampleFrame() const { return m_destinationNode->currentSampleF
rame(); } |
96 double currentTime() const { return m_destinationNode->currentTime(); } | 96 double currentTime() const { return m_destinationNode->currentTime(); } |
97 float sampleRate() const { return m_destinationNode->sampleRate(); } | 97 float sampleRate() const { return m_destinationNode->sampleRate(); } |
98 | 98 |
99 AudioBuffer* createBuffer(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate, ExceptionState&); | 99 AudioBuffer* createBuffer(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate, ExceptionState&); |
100 | 100 |
101 // Asynchronous audio file data decoding. | 101 // Asynchronous audio file data decoding. |
102 void decodeAudioData(ArrayBuffer*, PassOwnPtrWillBeRawPtr<AudioBufferCallbac
k>, PassOwnPtrWillBeRawPtr<AudioBufferCallback>, ExceptionState&); | 102 void decodeAudioData(ArrayBuffer*, AudioBufferCallback*, AudioBufferCallback
*, ExceptionState&); |
103 | 103 |
104 AudioListener* listener() { return m_listener.get(); } | 104 AudioListener* listener() { return m_listener.get(); } |
105 | 105 |
106 // The AudioNode create methods are called on the main thread (from JavaScri
pt). | 106 // The AudioNode create methods are called on the main thread (from JavaScri
pt). |
107 AudioBufferSourceNode* createBufferSource(); | 107 AudioBufferSourceNode* createBufferSource(); |
108 MediaElementAudioSourceNode* createMediaElementSource(HTMLMediaElement*, Exc
eptionState&); | 108 MediaElementAudioSourceNode* createMediaElementSource(HTMLMediaElement*, Exc
eptionState&); |
109 MediaStreamAudioSourceNode* createMediaStreamSource(MediaStream*, ExceptionS
tate&); | 109 MediaStreamAudioSourceNode* createMediaStreamSource(MediaStream*, ExceptionS
tate&); |
110 MediaStreamAudioDestinationNode* createMediaStreamDestination(); | 110 MediaStreamAudioDestinationNode* createMediaStreamDestination(); |
111 GainNode* createGain(); | 111 GainNode* createGain(); |
112 BiquadFilterNode* createBiquadFilter(); | 112 BiquadFilterNode* createBiquadFilter(); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 HashSet<AudioNode*> m_deferredCountModeChange; | 352 HashSet<AudioNode*> m_deferredCountModeChange; |
353 | 353 |
354 // This is considering 32 is large enough for multiple channels audio. | 354 // This is considering 32 is large enough for multiple channels audio. |
355 // It is somewhat arbitrary and could be increased if necessary. | 355 // It is somewhat arbitrary and could be increased if necessary. |
356 enum { MaxNumberOfChannels = 32 }; | 356 enum { MaxNumberOfChannels = 32 }; |
357 }; | 357 }; |
358 | 358 |
359 } // namespace blink | 359 } // namespace blink |
360 | 360 |
361 #endif // AudioContext_h | 361 #endif // AudioContext_h |
OLD | NEW |