Browse Source

Update Spatialization example;

bjorn 4 years ago
parent
commit
6b21e185d8
1 changed files with 2 additions and 3 deletions
  1. 2 3
      examples/Audio/Spatialization/main.lua

+ 2 - 3
examples/Audio/Spatialization/main.lua

@@ -1,7 +1,6 @@
 function lovr.load()
 function lovr.load()
-  source = lovr.audio.newSource('sine.wav', { spatial = true })
-  source:setEffectEnabled('spatialization', true)
-  source:setEffectEnabled('falloff', true)
+  effects = { 'spatialization', 'attenuation' }
+  source = lovr.audio.newSource('sine.wav', effects = effects)
   source:setLooping(true)
   source:setLooping(true)
   source:play()
   source:play()
 end
 end