How do I stream audio

Generated on 11/5/2024

1 search

To stream audio, you can use the new API added to the SC stream in the ScreenCaptureKit. This API allows you to capture and record audio, including microphone and system audio, by configuring the SC stream appropriately. You can set up a stream configuration to capture the microphone and use the SC stream output to receive audio samples. This is particularly useful for writing the samples to a file.

For spatial computing apps, RealityKit offers a stream loading strategy for audio data. This strategy streams audio data from disk, decoding it in real time, which reduces memory usage but may introduce additional latency. This is suitable for large ambient audio files that do not have strict latency requirements.

For more detailed information on capturing and streaming audio, you can refer to the following sessions: