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 emitter roll-off (requires warning log) #4844

Closed
3risian opened this issue Jan 25, 2023 · 4 comments
Closed

Audio emitter roll-off (requires warning log) #4844

3risian opened this issue Jan 25, 2023 · 4 comments

Comments

@3risian
Copy link
Contributor

3risian commented Jan 25, 2023

Description

STK track creation lists a roll-off feature to allow sounds to gradually lose volume when you are further away from them. This appears to not work at all.

Steps to reproduce

Run any track with an audio emitter, and slowly approach the sound emitter. It should fade in as you drive closer, instead it immediately plays full volume. Modifying the roll-off rate in the scene.xml file makes no difference.

Example track: testrolloffparticles.zip

Configuration

STK release version:
1.4

@qwertychouskie
Copy link
Contributor

Roll-off (and positional audio in general) requires that the source sound file be mono, stereo sources will cause the described behavior.

@3risian
Copy link
Contributor Author

3risian commented Jan 28, 2023

Confirmed that making the audio file mono will enable roll-off. Thanks!
I understand why a stereo positional sound is strange, although I still think this issue should remain open do discuss if the way the engine handles it is appropriate (I'd propose playing no sound and giving a console error, instead of quietly failing positional/roll-off) and adding this to documentation (and the Blender export tools tooltips) so new artists aren't confused like I was. (edit: it's briefly mentioned on the SFX Guidelines page, but not the Special Effects page that discusses the sound emitter options)

I can draft and commit the documentation changes in the other repos, thoughts on the engine handling would be appreciated.

@qwertychouskie
Copy link
Contributor

I believe it's an OpenAL limitation, though a warning message in the terminal would probably be a good idea.

@3risian 3risian changed the title Audio emitter roll-off not working Audio emitter roll-off (requires warning log) Apr 13, 2023
@Alayan-stk-2 Alayan-stk-2 added this to the 1.5 milestone Nov 24, 2023
@Alayan-stk-2
Copy link
Collaborator

The game will now print in the console an error message such as:

[error ] SFXBuffer: Positional audio is not supported with stereo files, but path/to/audio.ogg is stereo

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

No branches or pull requests

3 participants