Link Search Menu Expand Document


A place to emit sound from. It can either play live-streamed audio or static sound files:

  • If given a sound effect asset to its constructor, it will play that asset looping
  • If not given a sound effect, it will allocate a live_media track, which you can then use to send_audio with:
    local leftSpeaker = ui.Speaker(ui.Bounds(0,0,0,  1,1,1))
    app:scheduleAction(0.02, true, function()
      local leftAudio, rightAudio = player:generateAudio(960)
      if left and leftSpeaker.trackId then
     app.client.client:send_audio(leftSpeaker.trackId, leftAudio)