Przeglądaj źródła

Clarify effects = false;

bjorn 4 lat temu
rodzic
commit
fc889f818f

Plik diff jest za duży
+ 878 - 324
api/init.lua


+ 4 - 3
api/lovr/audio/Source/isEffectEnabled.lua

@@ -18,9 +18,10 @@ return {
   },
   notes = [[
     The active spatializer will determine which effects are supported.  If an unsupported effect is
-    enabled on a Source, no error will be reported.  Instead, it will be silently ignored (this
-    function will still report it as enabled).
+    enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See
+    `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer.
 
-    TODO: expose a table of supported effects for spatializers in docs or from Lua.
+    Calling this function on a Source that was created with `{ effects = false }` will always return
+    false.
   ]]
 }

+ 4 - 2
api/lovr/audio/Source/setEffectEnabled.lua

@@ -17,8 +17,10 @@ return {
   returns = {},
   notes = [[
     The active spatializer will determine which effects are supported.  If an unsupported effect is
-    enabled on a Source, no error will be reported.  Instead, it will be silently ignored.
+    enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See
+    `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer.
 
-    TODO: expose a table of supported effects for spatializers in docs or from Lua.
+    Calling this function on a Source that was created with `{ effects = false }` will throw an
+    error.
   ]]
 }

+ 2 - 1
api/lovr/audio/newSource.lua

@@ -32,7 +32,8 @@ return {
           description = [[
             A table of `Effect`s to enable.  Keys can be integers (list) or effect names (map), or a
             combination of both.  The special value `false` can be used to completely disable
-            effects, bypassing the spatializer entirely.  `true` will enable all effects.
+            effects, bypassing the spatializer entirely and throwing an error when trying to enable
+            effects.  `true` will enable all effects.
           ]]
         }
       }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików