lovr.audio.start
EditStarts the active playback or capture device. By default, the playback device is automatically initialized and started the first time a Source is played, but this can be controlled using the t.audio.start flag in lovr.conf.
started, error = lovr.audio.start(type)Arguments
| Name | Type | Default | Description |
| type | AudioType | 'playback' | The type of device to start. |
Returns
| Name | Type | Description |
| started | boolean | Whether the device was successfully started. |
| error | string | nil | The error message, if any. |
Notes
Starting an audio device may fail if:
- The device is already started
- No device was initialized with
lovr.audio.setDevice - Lack of
audiocapturepermission on Android (seelovr.system.requestPermission) - Some other problem accessing the audio device