REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Update audio engine

Open frabert opened this issue 7 years ago • 9 comments

Provides a more backend-independent audio system Also fixes some sounds being played at half speed (chapter introductions)

frabert avatar Sep 12 '18 19:09 frabert

Tested your build. The chapter music works fine, but it seems that musiczones got somehow messed up. When you enter Khorinis, for example, music doesn't switch until you reach the place in front of Vatras. Also, I had the impression that just by turning the Hero, it had an impact on the music (directly in front of Lobart, there was a weird switching in between the lobart and the regular world theme).

tomedi avatar Sep 13 '18 21:09 tomedi

@ShFil119 I addressed most of the criticisms, thanks. @tomedi I don't think those issues could be introduced with this PR. If you toggle the debug music zones draw, you can see that indeed the city zone starts in front of Vatras's place

frabert avatar Sep 14 '18 16:09 frabert

I'm marking this as WIP, I'd like to make some more updates like making the AudioWorld live in the BaseEngine instead of the World (there are no ties between it and the AudioWorld), to allow stuff like playing music and sound effects before a game is started

frabert avatar Sep 14 '18 17:09 frabert

@ShFil119 Done addressing the new reviews.

During testing Gothic 1 I noticed that some sounds are played even though they should not be heard, like In Extremo (which is now playing correctly 👍 ) that starts right as the player is spawned. Maybe it's got something to do with the maximumDistance. More investigation is needed

frabert avatar Sep 14 '18 23:09 frabert

Last commit should fix the issue, marking as ready for review & merge

frabert avatar Sep 15 '18 10:09 frabert

The game crashes when you load a savegame after you started a new game. crashlog_music.txt

tomedi avatar Sep 22 '18 15:09 tomedi

Can you confirm this is not present in master? I cannot reproduce this on my machine

Also this looks like it's got something to do with bgfx/3d rendering, I'm not sure what could have introduced it from this PR

frabert avatar Sep 22 '18 16:09 frabert

@frabert Oh, I'm sorry... This crash is indeed present at the latest master-build. Just stumbled over it because I was testing your branch.

tomedi avatar Sep 22 '18 16:09 tomedi

That's a bug on its own right, anyway. I remember seeing something similar some time ago but could never pinpoint it to something precise, it happens sometimes when sometimes calls btVector3::normalize apparently

frabert avatar Sep 22 '18 16:09 frabert