Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Music fading problem

Author
Message
Wizz
10
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 5th Nov 2012 22:30
I made a function that makes music fade out in my game. The function decreases the volume by 1 on every third frame until the volume reaches 0. I ran the game and the music started fading for about a second and then it just cut off. I tried to debug my code but realised that my code was okay. The issue is that when the music volume is 1, the music is still quite loud. And at volume 0 it is muted. The music should be playing at 1% volume if the volume is set to 1 according to the documentation. But it sounds more like it's playing at 50%. Any idea how to make this work?

Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 6th Nov 2012 00:54
I think the music / sound volume setting is logarithmic.
Since it only accepts integer "percents" this indeed causes problems.


"Why do programmers get Halloween and Christmas mixed up?"
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Nov 2012 17:49
try floats?

Wizz
10
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 15th Nov 2012 12:21
Quote: "try floats?"


Read above.

MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th Nov 2012 12:27
I recall it using floats... But thats in DBPro... Of vourse I could be wrong...

Morcilla
16
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 17th Nov 2012 16:31
This is a DGDK problem since ever. I don't know if DBPro has the same issue.
A member of this board made a music mp3 library that included fade in/out, but I never tried it. It must be somewhere in the forum...

Login to post a reply

Server time is: 2019-09-16 02:59:36
Your offset time is: 2019-09-16 02:59:36