Commit Graph

3507 Commits

Author SHA1 Message Date
bjorn 058700f970 Allow lovr.audio.setDevice(type, nil); 2021-03-04 18:19:05 -07:00
bjorn 0c3351331e Sink attempt; 2021-03-03 20:01:56 -07:00
bjorn f806c07bfa Simplify spatializer interface temporarily; 2021-03-03 15:49:28 -07:00
bjorn bc41eecf09 oculus spatializer: free memory; use MAX_SOURCES 2021-03-03 15:46:01 -07:00
bjorn 8188e51060 lovr.audio.get/setAbsorption;
I HOPE THIS LETS US DO UNDERWATER EFFECT
2021-03-03 15:40:27 -07:00
bjorn 2c0875087f Source:getSound; 2021-03-03 15:32:41 -07:00
bjorn dd98b11b3f Effect;
Basically replace each individual accessor with a general one.
2021-03-03 15:25:03 -07:00
bjorn 746735259c Windows: Always use WinMain for UTF8 command line arguments;
This fixes problems with paths containing special characters on windows.
2021-03-02 11:49:08 -07:00
bjorn dd0891d087 Fix simple spatializer; 2021-03-02 11:49:00 -07:00
bjorn e1e21def82 More consistent spatializer symbol names; 2021-03-01 17:53:49 -07:00
bjorn 1c3a01de2a Add windows icon; 2021-03-01 17:45:12 -07:00
bjorn 9a55769348 tup: autodetect host tag; 2021-02-28 16:05:28 -07:00
bjorn f3a12f2af9 Turn openvr into an imported library;
It uses a deprecated version of CMake, creates weird directories,
is slow to compile, and causes tup to rely on CMake more.  Instead,
just use its binary artifacts directly.
2021-02-28 15:49:06 -07:00
bjorn cf4bb36d03 AudioMaterial; 2021-02-28 15:27:33 -07:00
mcc d233d5ccd3 Fix MSVC build
- stdatomic.h had not defined ATOMIC_INT_LOCK_FREE, but it is now required
- It's _MSC_VER, not _MSVC_VER
2021-02-28 14:12:16 -08:00
bjorn 5f4e5c5721 rm Source:play loop shortcut; 2021-02-26 13:41:58 -07:00
bjorn 92492dcef1 rm spatial blend for now; 2021-02-26 13:24:01 -07:00
bjorn cb1b78f2cc Rename Source:get/setTime to Source:seek and Source:tell; 2021-02-26 13:21:40 -07:00
bjorn 7bb6861180 Source:get/setPosition; Source:get/setOrientation; 2021-02-26 13:10:59 -07:00
bjorn f3482fc15a lovr.audio.get/setPosition; lovr.audio.get/setOrientation; 2021-02-26 13:05:23 -07:00
bjorn 6eef950aa8 year; 2021-02-25 18:02:12 -07:00
bjorn 8a29c9c1f5 CMake: whitespace; 2021-02-25 16:31:14 -07:00
bjorn cd38039ca8 tup: macOS updates for Big Sur compatibility; 2021-02-25 16:30:06 -07:00
bjorn d1a2ded4db Fix luaopen_lovr_filesystem stack index; 2021-02-25 16:29:52 -07:00
bjorn f82e8112fe Simplify filesystem arguments; 2021-02-25 10:45:45 -07:00
bjorn a09b7de545 lovr.system.getCoreCount; 2021-02-25 09:30:05 -07:00
bjorn 4f5adbc64c lovr.system; 2021-02-25 09:00:12 -07:00
bjorn a94a1c22bf simple spatializer uses physically correct attenuation;
This matches phonon.
2021-02-24 17:51:44 -07:00
bjorn 39a4d2c1d5 rm lovr.graphics.triangle; 2021-02-24 17:45:31 -07:00
bjorn 3055cd718c rm shared sources; 2021-02-24 17:43:42 -07:00
bjorn f47a688d53 phonon: configuration options; 2021-02-24 17:43:42 -07:00
bjorn bec4fc3169 phonon: implement convolution reverb; 2021-02-24 17:43:42 -07:00
bjorn ec96a126d7 phonon: accessors; multiple sources; start reverb; 2021-02-24 17:43:42 -07:00
bjorn 5f2cdf0c22 phonon: Directivity adjustments; 2021-02-24 17:43:42 -07:00
bjorn f60d6c8900 phonon: I hate typing dipole; 2021-02-24 17:43:42 -07:00
bjorn 7f032b7a3e phonon: Change absorption to a boolean; 2021-02-24 17:43:42 -07:00
bjorn 90ca17c454 phonon: Change falloff to a boolean; 2021-02-24 17:43:42 -07:00
bjorn 87bbec7018 phonon: setGeometry test; 2021-02-24 17:43:42 -07:00
bjorn 00a71870c2 tup: Fix android phonon library path; 2021-02-24 17:43:42 -07:00
bjorn 16cfb7bad5 phonon: binaural renderer, binaural effect, HRTF; 2021-02-24 17:43:42 -07:00
bjorn ac96556a13 phonon: Source:get/setDirectivity; 2021-02-24 17:43:42 -07:00
bjorn 66e574baac phonon: Source:get/setAbsorption; 2021-02-24 17:43:42 -07:00
bjorn c531243d7d phonon: Source:get/setFalloff;
The falloff is the minimum distance at which inverse distance
attenuation takes place.

A non-positive value disables distance attenuation.

In the Lua API, nil can be used to disable attenuation, a boolean can be
used to enable attenuation with a default minimum distance, or a number
can be used for full control over the parameter.
2021-02-24 17:43:42 -07:00
bjorn 0af7e98fad phonon: rearrange Source accessors; 2021-02-24 17:43:42 -07:00
bjorn 584138c937 phonon: Compute listener/source basis vectors; 2021-02-24 17:43:42 -07:00
bjorn f4a8a4d388 WIP; 2021-02-24 17:43:42 -07:00
bjorn 8bbb092497 Start phonon spatializer; 2021-02-24 17:43:42 -07:00
bjorn 5d542eb2ea Minor Sound cleanup; 2021-02-24 14:11:49 -07:00
bjorn 7d0dfc9cdd Sound: Ambisonic support;
Add support for importing ambisonic WAV files and 24/32 bit PCM WAV files.

The standard ambisonic format used internally in LÖVR is ACN channel ordering with SN3D normalization.
Anything else will be converted to this form.

There are a few restrictions and assumptions:

- Only 1st order ambisonics are supported.  They need to have 4 channels.
- They can be in AMB format (Furse-Malham order/normalization), detected via WAVE_EXTENSIBLE GUID.
- Any other 4 channel file is assumed to be in "AmbiX" ACN/SN3D format.
  - It seems that most ambisonic files in the wild that claim to be AmbiX are just 4 channel WAVs without any metadata.
  - This means that non-ambisonic 4 channel WAVs could ambiguously be mistaken as ambisonic.  This is incurred as a limitation of LÖVR.
- Ambisonic files can not currently be played back.  SteamAudio currently has numerous bugs with this.
  - Perhaps it would be possible to write an ambisonic rotator/panning decoder to use as a default implementation.
2021-02-24 14:11:49 -07:00
bjorn 1d1a2de124 Only use CTZL in audio; 2021-02-24 14:11:49 -07:00