Author Topic: [SOLVED] The distorted sound and music in the game Halloween.  (Read 111 times)

gbudny

  • Posts: 2
Hi

Jadeware published the source code of the game Halloween that use the BASS library
 
https://github.com/brizzly/Halloween3D

Farox and pocak100 were able to create a playable version of this game for Linux x86-64.
Unfortunately, nobody knows why the sound and music are distorted only in the Linux version.

There is the bass.h and libbbass.h:

https://github.com/brizzly/Halloween3D/blob/master/HalloweenSrc/bass.h
https://github.com/brizzly/Halloween3D/blob/master/HalloweenSrc/libbass.h

Few other files have the word bass in them:

https://github.com/brizzly/Halloween3D/blob/master/HalloweenSrc/halloween.h
https://github.com/brizzly/Halloween3D/blob/master/HalloweenSrc/dsound.h
https://github.com/brizzly/Halloween3D/blob/master/HalloweenSrc/misc/halloween.h

Can you help me?
 
« Last Edit: 18 Nov '21 - 23:52 by gbudny »

Ian @ un4seen

  • Administrator
  • Posts: 23980
Re: The distorted sound and music in the game Halloween.
« Reply #1 on: 16 Nov '21 - 16:06 »
From the source code, it looks like it is/was using an old BASS version that still had the BASS_ChannelSetAttributes function. That was replaced with BASS_ChannelSetAttribute in BASS 2.4, and I see the code has been updated to use that but the issue is that the BASS_ATTRIB_VOL setting ranges 0-1 rather than 0-100, so you need to divide the old "volume" value by 100 in those calls. For example:

Code: [Select]
res = BASS_ChannelSetAttribute(gSoundObjet[SoundID].channel3D[sound_pos],
BASS_ATTRIB_VOL,
  volume / 100.f);

gbudny

  • Posts: 2
Re: The distorted sound and music in the game Halloween.
« Reply #2 on: 17 Nov '21 - 19:06 »
Thank you for your help.

It works!
« Last Edit: 18 Nov '21 - 23:52 by gbudny »