bjorn 4 years ago
parent
commit
2ded851b00
3 changed files with 20 additions and 6 deletions
  1. 10 3
      api/init.lua
  2. 8 1
      api/lovr/audio/AudioType.lua
  3. 2 2
      api/lovr/audio/setDevice.lua

+ 10 - 3
api/init.lua

@@ -833,7 +833,7 @@ return {
         {
           name = "AudioType",
           summary = "Different types of audio devices",
-          description = "When referencing audio devices, this type indicates whether it's the playback or capture device.",
+          description = "When referencing audio devices, this indicates whether it's the playback or capture device.",
           key = "AudioType",
           module = "lovr.audio",
           values = {
@@ -845,6 +845,13 @@ return {
               name = "capture",
               description = "The capture device (microphone)."
             }
+          },
+          related = {
+            "lovr.audio.getDevices",
+            "lovr.audio.setDevice",
+            "lovr.audio.start",
+            "lovr.audio.stop",
+            "lovr.audio.isStarted"
           }
         },
         {
@@ -1306,7 +1313,7 @@ return {
                 {
                   name = "type",
                   type = "AudioType",
-                  description = "The device to switch (playback or capture).",
+                  description = "The device to switch.",
                   default = "'playback'"
                 },
                 {
@@ -1324,7 +1331,7 @@ return {
                 {
                   name = "mode",
                   type = "AudioShareMode",
-                  description = "The sharing mode for the device (exclusive or shared).",
+                  description = "The sharing mode for the device.",
                   default = "shared"
                 }
               },

+ 8 - 1
api/lovr/audio/AudioType.lua

@@ -1,7 +1,7 @@
 return {
   summary = 'Different types of audio devices',
   description = [[
-    When referencing audio devices, this type indicates whether it's the playback or capture device.
+    When referencing audio devices, this indicates whether it's the playback or capture device.
   ]],
   values = {
     {
@@ -12,5 +12,12 @@ return {
       name = 'capture',
       description = 'The capture device (microphone).'
     }
+  },
+  related = {
+    'lovr.audio.getDevices',
+    'lovr.audio.setDevice',
+    'lovr.audio.start',
+    'lovr.audio.stop',
+    'lovr.audio.isStarted'
   }
 }

+ 2 - 2
api/lovr/audio/setDevice.lua

@@ -28,7 +28,7 @@ return {
       name = 'type',
       type = 'AudioType',
       default = [['playback']],
-      description = 'The device to switch (playback or capture).'
+      description = 'The device to switch.'
     },
     {
       name = 'id',
@@ -46,7 +46,7 @@ return {
       name = 'mode',
       type = 'AudioShareMode',
       default = 'shared',
-      description = 'The sharing mode for the device (exclusive or shared).'
+      description = 'The sharing mode for the device.'
     }
   },
   returns = {