Skip to content

omphalos.sound.get

function omphalos.sound.get(soundName);
function omphalos.sound.get(soundName, bundleName);

Gather and return the per-sound options for the sound name provided, optionally in a bundle other than this assets current bundle. The sound name is the name given to the sound in the sound manifest for the given bundle.

The returned value is an object with the default volume and panning that would be used to play this sound. If the system mixer has been used to adjust the settings for this sound, those settings will be returned. Otherwise, the values from the manifest are returned instead.

The return value follows the structure:

{
"volume": "number", // Linear volume multiplier, 0.0 to 1.0 (100%)
"pan": "number" // Stereo panning -1.0 to 1.0, 0.0 is center
}