Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio spatializer testing umbrella bug #424

Open
mcclure opened this issue Apr 22, 2021 · 5 comments
Open

Audio spatializer testing umbrella bug #424

mcclure opened this issue Apr 22, 2021 · 5 comments

Comments

@mcclure
Copy link
Contributor

mcclure commented Apr 22, 2021

Premise of this bug:

  1. We need a good, useful test or set of tests for the audio spatializers. It should test both location and reverb/geometry.
  2. We need to run this test on all spatializers and conclude the results subjectively "sound good"

My proposal for (1) is that I'll port the spatializer test from my game project/fork to run on vanilla Lovr with ogg-file sources.

Re: (2), here are the outstanding known "sounds bad" bugs:

Outstanding "functionality"/non-sound-related spatializer bugs:

The current best test we have

Check out the branch break-phonon-test-2 of my lovr-docs repo and run Showcase/Break. This version of break has some tweaks to support testing, it calls setGeometry, it enables all effects on the ball bounce sounds (but no effects on the "you lose" / "game starting" sounds), and the sounds have all been edited to have long periods of silence afterward (to work around #404).

You can select your spatializer/driver by uncommenting lines in conf.lua, and these lines at the top of main.lua let you quickly change the test:

local spaceSize = 16             -- Diameter of space 
local spaceFlip = false          -- If true reverse model winding
local audioMaterial = "concrete" -- Options include "carpet" "concrete" "glass"
local geometryMode = "mesh" -- Options "disable" "box" "mesh". "box" is oculus-audio-only
local volume = 1

There is a line you can edit later down to make the space a pentagon instead of a box.

Current test status

Testing with 0a4a62f from #422

  • Steam audio selected in conf.lua:

    • HRTF sounds good.
    • I primarily tested with audioMaterial=glass. spaceSize=16 sounds "pretty good". spaceSize=8 sounds fakey/chintzy. spaceSize=160 sounds freakish, the echo is drawn out and sounds strangely robotic.
    • The echo is being applied to break-buzzer.ogg and break-countdown.ogg, even though those do not have any effects enabled.
    • GeometryMode "Disabled" works as expected
  • Oculus audio selected in conf.lua:

    • HRTF sounds good.
    • Regardless of geometry node, no reverb is applied. Reversing winding has no effect.
@bjornbytes
Copy link
Owner

Finally starting to dig into this. This is a great summary of the current state of things and where they should improve. The Break branch is already a really good test case.

As mentioned in #425 I was able to fix the start/lose sounds to not have effects applied, I think this was just an issue with API usage.

One thing I noticed was really weird: If I uncomment the third setGeometry so it's applying the room mesh, on certain runs of Break, every time a blip plays this horrible distorted diminished chord blares like a train horn (which is really cool but probably a bug). Are you able to get that too? I was able to get it on all materials, intermittently. I think this means it's a race condition or something?

I'm going to initially focus on #404 so reverberating phonon sources don't need to be padded because that's just brutal UX

@bjornbytes
Copy link
Owner

If I create the blips with { effects = { 'reverb' } }, the train horn still appears, but if I do { effects = false }, the problem expectedly goes away.

@mcclure
Copy link
Contributor Author

mcclure commented May 28, 2021

Oculus Audio now works in my testing (slightly updated both PR and test). In mesh mode it sounds bad because we can't set the material so it just picks a "perfectly reflective" material which isn't physically accurate.

I think I managed to trigger a bug with what happens if you run out of slots, I think instead of correctly killing old sounds it starts playing weird distortion.

@bjornbytes
Copy link
Owner

Do you know if it's when you run out of Oculus slots or Source slots? I did test the Source recycling stuff, Source:play should return false if you try to call play on it when too many (64) sources are already playing.

@mcclure
Copy link
Contributor Author

mcclure commented May 28, 2021

It would be oculus slots. It was when the sounds were done playing but their tails were still running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants