Source/modules/webaudio/AudioContext.cpp
// Constructor for offline (non-realtime) rendering.
Constructor for offline (non-realtime) rendering.
Constructor for offline ( non - realtime ) rendering .
AudioContext::AudioContext(Document* document, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate)
    : ActiveDOMObject(document)
    , m_isStopScheduled(false)
    , m_isCleared(false)
    , m_isInitialized(false)
    , m_destinationNode(nullptr)
    , m_isDeletionScheduled(false)
    , m_automaticPullNodesNeedUpdating(false)
    , m_connectionCount(0)
    , m_audioThread(0)
    , m_graphOwnerThread(UndefinedThreadIdentifier)
    , m_isOfflineContext(true)
{
    ScriptWrappable::init(this);
    m_renderTarget = AudioBuffer::create(numberOfChannels, numberOfFrames, sampleRate);
    if (m_renderTarget.get())
        m_destinationNode = OfflineAudioDestinationNode::create(this, m_renderTarget.get());
    initialize();
}
AudioContext :: AudioContext ( Document * document , unsigned numberOfChannels , size_t numberOfFrames , float sampleRate ) : ActiveDOMObject ( document ) , m_isStopScheduled ( false ) , m_isCleared ( false ) , m_isInitialized ( false ) , m_destinationNode ( nullptr ) , m_isDeletionScheduled ( false ) , m_automaticPullNodesNeedUpdating ( false ) , m_connectionCount ( 0 ) , m_audioThread ( 0 ) , m_graphOwnerThread ( UndefinedThreadIdentifier ) , m_isOfflineContext ( true ) { ScriptWrappable :: init ( this ) ; m_renderTarget = AudioBuffer :: create ( numberOfChannels , numberOfFrames , sampleRate ) ; if ( m_renderTarget . get ( ) ) m_destinationNode = OfflineAudioDestinationNode :: create ( this , m_renderTarget . get ( ) ) ; initialize ( ) ; }
Constructor for offline (non-realtime) rendering.
Constructor for offline ( non - realtime ) rendering .
// Create a new destination for offline rendering.