-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Refactor AmbientSound #2688
Refactor AmbientSound #2688
Conversation
fbac6d9
to
02d78ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good code-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Sound Object" (imo. it's name should be displayed as just "Sound" when hovering over it in the editor, since the music one is also is simply called "Music") has a problem with looping a sound. If the interfall is set to anything above 0 it only plays the sound once. Set it to 0 or a negative and after the sound has played fully once, it will bug out (I tested it with "sounds/rain.wav" which is 25 seconds long).
This seems to be some sort of OpenAL issue because it works fine with short sounds. Apparently after playing once sound source drops the attached buffer data? Not sure. |
Seems like the sound looping remains the only major issue with this one. Otherwise the rest seems be fine, aside the display name change for consistency |
Maybe dropping interval setting and using internal OpenAL looping feature would be a good enough solution? |
Would be worth a try, I suppose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. That seems to have fixed the looping issue - approve!
Implements new SoundObject object that is hearable in entire Sector. It is possible to change it's volume and looping sound play interval. Attempts to fix the long-broken AmbientSound.