| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 class DynamicsCompressorNode; | 66 class DynamicsCompressorNode; |
| 67 class AnalyserNode; | 67 class AnalyserNode; |
| 68 class WaveShaperNode; | 68 class WaveShaperNode; |
| 69 class ScriptProcessorNode; | 69 class ScriptProcessorNode; |
| 70 class OscillatorNode; | 70 class OscillatorNode; |
| 71 class PeriodicWave; | 71 class PeriodicWave; |
| 72 | 72 |
| 73 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. | 73 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c
reated from it. |
| 74 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. | 74 // For thread safety between the audio thread and the main thread, it has a rend
ering graph locking mechanism. |
| 75 | 75 |
| 76 class AudioContext : public ActiveDOMObject, public ScriptWrappable, public Thre
adSafeRefCounted<AudioContext>, public EventTarget { | 76 class AudioContext : public EventTarget, public ActiveDOMObject, public ScriptWr
appable, public ThreadSafeRefCounted<AudioContext> { |
| 77 public: | 77 public: |
| 78 // Create an AudioContext for rendering to the audio hardware. | 78 // Create an AudioContext for rendering to the audio hardware. |
| 79 static PassRefPtr<AudioContext> create(Document*); | 79 static PassRefPtr<AudioContext> create(Document*); |
| 80 | 80 |
| 81 // Create an AudioContext for offline (non-realtime) rendering. | 81 // Create an AudioContext for offline (non-realtime) rendering. |
| 82 static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned num
berOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&); | 82 static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned num
berOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&); |
| 83 | 83 |
| 84 virtual ~AudioContext(); | 84 virtual ~AudioContext(); |
| 85 | 85 |
| 86 bool isInitialized() const; | 86 bool isInitialized() const; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // It is somewhat arbitrary and could be increased if necessary. | 347 // It is somewhat arbitrary and could be increased if necessary. |
| 348 enum { MaxNumberOfChannels = 32 }; | 348 enum { MaxNumberOfChannels = 32 }; |
| 349 | 349 |
| 350 // Number of AudioBufferSourceNodes that are active (playing). | 350 // Number of AudioBufferSourceNodes that are active (playing). |
| 351 int m_activeSourceCount; | 351 int m_activeSourceCount; |
| 352 }; | 352 }; |
| 353 | 353 |
| 354 } // WebCore | 354 } // WebCore |
| 355 | 355 |
| 356 #endif // AudioContext_h | 356 #endif // AudioContext_h |
| OLD | NEW |