I have something like this for playing audio clips. I have a GPI check the frame buffer and layer to see if an audio scene is playing. If so, it gets the Scene Director position, then sets it to fade out from there. Sounds like you would be triggering this from the master scene director, perhaps put in a Script Scene Director Clip.
I tried to update this for what you describe. Hope it works.
dim sceneDir as xpSceneDirector
dim AudioFileClip, offlineEventClip as xpSceneDirectorClip
dim AudioTrack, eventTrack as xpSceneDirectorTrack
dim startFade, endFade as long
Scene.GetSceneDirectorByName("MasterDirector",sceneDir)
sceneDir.GetTrackByName("Audio1",AudioTrack)
AudioTrack.GetClipByName("YourAudienceApplpause",AudioFileClip)
' Set start fade and end fade position
startFade = Clng(sceneDir.Position)
endFade = Clng(sceneDir.Position) + 40
' Set keyframe at current position, then fades out over 40 frames
AudioFileClip.AddKeyFrame(startFade)
AudioFileClip.SetKeyFrame(endFade,Clng(0))
' This positions the offline event clip to sit after the fade is oevr. You may not need this.
sceneDir.GetTrackByName("Track1",eventTrack)
eventTrack.GetClipByName("OfflineEvent",offlineEventClip)
offlineEventClip.Position = endFade
#XPression