AudioComponentSource

namespace VideoKit.Sources {
    /// <summary>
    /// Media source for generating audio buffers from an `AudioSource` or `AudioListener` component.
    /// </summary>
    class AudioComponentSource : IDisposable { ... }   
}

INCOMPLETE


Creating an Audio Component Source

INCOMPLETE

From an Audio Listener

/// <summary>
/// Create an audio buffer source from an AudioListener.
/// </summary>
/// <param name="handler">Handler to receive audio buffers.</param>
/// <param name="listener">Audio listener to record.</param>
AudioComponentSource (
    Action<AudioBuffer> handler,
    AudioListener listener
);

INCOMPLETE

/// <summary>
/// Create an audio buffer source from an AudioListener.
/// </summary>
/// <param name="handler">Handler to receive audio buffers.</param>
/// <param name="clock">Clock for generating timestamps.</param>
/// <param name="listener">Audio listener for the current scene.</param>
AudioComponentSource (
    Action<AudioBuffer> handler,
    IClock? clock,
    AudioListener listener
);

From an Audio Source

/// <summary>
/// Create an audio buffer source from an AudioSource.
/// </summary>
/// <param name="handler">Handler to receive audio buffers.</param>
/// <param name="source">Audio source to record.</param>
AudioComponentSource (
    Action<AudioBuffer> handler,
    AudioSource source
);

INCOMPLETE

/// <summary>
/// Create an audio buffer source from an AudioSource.
/// </summary>
/// <param name="handler">Handler to receive audio buffers.</param>
/// <param name="clock">Clock for generating timestamps.</param>
/// <param name="source">Audio source to record.</param>
AudioComponentSource (
    Action<AudioBuffer> handler,
    IClock? clock,
    AudioSource source
);

Disposing the Source

/// <summary>
/// Stop the audio component source and release resources.
/// </summary>
void Dispose ();

INCOMPLETE


Was this page helpful?