Audio
The sea's sounds on the Audio API: AudioPlayers, AudioEmitters in the world and one AudioListener on the camera, all
wired through a single low-pass filter that goes dull while the camera is under the surface. No legacy Sound is
made anywhere in the Ocean or its addons.
Ocean.Audio.Play("rbxassetid://123", nil, { Volume = 0.8 }) -- heard everywhere
Ocean.Audio.Play("rbxassetid://123", point, { Volume = 1, Distance = 800 }) -- from a spot in the world
Functions
SetMuffle
Audio.SetMuffle(amount: number) → ()How dull everything the Ocean plays is, 0 (open) to 1 (as if under water). Eased by whoever calls it.
NewPlayer
A new AudioPlayer wired into the shared chain (heard everywhere, through the muffle). For loops that
manage their own volume; Audio.Play is the one for one-shots.
Measure
Audio.Measure(id: string) → ()
Plays id silently once, into an AudioAnalyzer only, to learn how loud it gets (the loudest moment of the
whole clip), so a later Audio.Play with Normalize can bring it to a known level whatever asset it is.
Takes as long as the clip; one voice, nothing audible. Does nothing for one already measured.
Play
Plays id once and cleans everything up afterwards. With a position the sound comes from that spot in
the world (an AudioEmitter, heard by the listener on the camera, louder the closer); without one it is
heard everywhere. Returns the player, or nil where audio is not available (a server) or id is blank.