attachToContainerWithBuilder
Attaches spatial audio to a Container/Context using a pre-configured AudioTrack.Builder.
When to use: Use this method when the audio should follow the window/container position rather than a specific Entity. This is suitable for window-based playback scenarios (e.g., fixed-position background audio).
Usage steps:
Configure spatial audio mode via spatialAudioTrackExtensionConfig.
Call this method with the configured builder.
Build the AudioTrack:
audioTrackBuilder.build().
Parameters
currentContext
The Context/Container to attach spatial audio to.
builder
The AudioTrack.Builder with spatial audio configuration (must be pre-configured via spatialAudioTrackExtensionConfig).
Throws
IllegalStateException
if attachment fails.