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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 unsigned long activeSourceCount() const { return static_cast<unsigned long>(
m_activeSourceCount); } | 98 unsigned long activeSourceCount() const { return static_cast<unsigned long>(
m_activeSourceCount); } |
99 | 99 |
100 void incrementActiveSourceCount(); | 100 void incrementActiveSourceCount(); |
101 void decrementActiveSourceCount(); | 101 void decrementActiveSourceCount(); |
102 | 102 |
103 PassRefPtr<AudioBuffer> createBuffer(unsigned numberOfChannels, size_t numbe
rOfFrames, float sampleRate, ExceptionState&); | 103 PassRefPtr<AudioBuffer> createBuffer(unsigned numberOfChannels, size_t numbe
rOfFrames, float sampleRate, ExceptionState&); |
104 PassRefPtr<AudioBuffer> createBuffer(ArrayBuffer*, bool mixToMono, Exception
State&); | |
105 | 104 |
106 // Asynchronous audio file data decoding. | 105 // Asynchronous audio file data decoding. |
107 void decodeAudioData(ArrayBuffer*, PassOwnPtr<AudioBufferCallback>, PassOwnP
tr<AudioBufferCallback>, ExceptionState&); | 106 void decodeAudioData(ArrayBuffer*, PassOwnPtr<AudioBufferCallback>, PassOwnP
tr<AudioBufferCallback>, ExceptionState&); |
108 | 107 |
109 AudioListener* listener() { return m_listener.get(); } | 108 AudioListener* listener() { return m_listener.get(); } |
110 | 109 |
111 // The AudioNode create methods are called on the main thread (from JavaScri
pt). | 110 // The AudioNode create methods are called on the main thread (from JavaScri
pt). |
112 PassRefPtr<AudioBufferSourceNode> createBufferSource(); | 111 PassRefPtr<AudioBufferSourceNode> createBufferSource(); |
113 PassRefPtr<MediaElementAudioSourceNode> createMediaElementSource(HTMLMediaEl
ement*, ExceptionState&); | 112 PassRefPtr<MediaElementAudioSourceNode> createMediaElementSource(HTMLMediaEl
ement*, ExceptionState&); |
114 PassRefPtr<MediaStreamAudioSourceNode> createMediaStreamSource(MediaStream*,
ExceptionState&); | 113 PassRefPtr<MediaStreamAudioSourceNode> createMediaStreamSource(MediaStream*,
ExceptionState&); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // It is somewhat arbitrary and could be increased if necessary. | 325 // It is somewhat arbitrary and could be increased if necessary. |
327 enum { MaxNumberOfChannels = 32 }; | 326 enum { MaxNumberOfChannels = 32 }; |
328 | 327 |
329 // Number of AudioBufferSourceNodes that are active (playing). | 328 // Number of AudioBufferSourceNodes that are active (playing). |
330 int m_activeSourceCount; | 329 int m_activeSourceCount; |
331 }; | 330 }; |
332 | 331 |
333 } // WebCore | 332 } // WebCore |
334 | 333 |
335 #endif // AudioContext_h | 334 #endif // AudioContext_h |
OLD | NEW |