As it stands all my audio file are added in as sources, and their volumes have been set to a specific amount that makes all the sources sound great comparatively, but doesn't allow me to change the volume easily, or mute the volume.
So my current solution is this: currently almost all of my audio is run through a function whenever it is called to be played, so I'm thinking that whenever that function is called, it will run through a simple check:
Code: Select all
masterVolume = 0
sounds = {}
if sounds.toString(source) == nil then
source:setVolume(source:getVolume() * masterVolume)
sounds.toString(source) = true
end
However, I'm having trouble toStringifying the source, does anyone know of how to do this?
Or, if there's some obvious solution I'm missing, what is a better way to keep track of my audio?