Skip to content

Instantly share code, notes, and snippets.

@kexoth
Created September 13, 2014 17:37
Show Gist options
  • Select an option

  • Save kexoth/f23345f1c64cca76bdce to your computer and use it in GitHub Desktop.

Select an option

Save kexoth/f23345f1c64cca76bdce to your computer and use it in GitHub Desktop.
local muteButton=ui.newButton(muteGroup,"mute.png",display.contentWidth-50, display.contentHeight-430, 30, 30, function(event)
if clicked==event.action then
for i = 1, audio.totalChannels, 1 do
print("Volume:" .. audio.getVolume({ channel = i }) .. " Channel:" .. i)
if audio.getVolume({ channel = i }) == 0 then
audio.setVolume(1, { channel = i })
else
audio.setVolume(0, { channel = i })
end
end
end
end )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment