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.

DarkBASIC Professional Discussion / 'set music volume' command not responding

Author
Message
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 7th Jun 2013 00:48
Just noticed this was happening for me on trying to recompile a game I've been working on for several months now. I'm guessing this is a bug with the 7.7 update, because I'm pretty sure it wasn't happening before I installed it
The 'set music volume' command doesn't seem to do anything to change the volume of any music, unless it's called several times.
So if you had music 1 playing at 100% volume, and you used the command
'set music volume 1, 60'
the music still plays at 100% volume :/
The solution I've found to this is to add 'for - next' loops in my game that run about 4 times whenever I'm changing the volume of some music. That seems to make it work.
Anyone else having this problem?
Thanks

[href][/href]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Jun 2013 01:17
I think you have to use sync with it.

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 7th Jun 2013 05:33
You need to use sync instead of fastsync, since it will update various parts of the sound system. You will also notice that repositioning sounds and listeners won't update positions until sync is called too. You can still use fastsync for multiple camera syncing. Just use sync when you go to update camera 0.

SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 7th Jun 2013 21:26 Edited at: 7th Jun 2013 21:32
Thanks for your help! Unfortunately, my program's never used fastsync as a command, just regular sync. And it does that at the end of every loop... Sorry! I might be getting confused over what you're saying.
Cutting out all the other stuff it does in the main loop, this is pretty much how the music loading part/main loop looks


When I ran that code after installing the 7.7 update, the music still played at 100% volume. Now I've changed the music loading part to this:


Now it works fine...
Did you mean I have to sync directly after changing the music?
It's just, it does sync at the end of the main loop anyway, so I'd have thought any changes I made to the music would happen then.
I'll do a few tests and see if I can work anything else out about this bug
Thanks

EDIT: I forgot to say, the 'music volume' command seems to work fine, and gives me whatever number I've tried to set the music at, even if the music is still playing at the original volume

SECOND EDIT: I just did a couple of tests in a blank project, and found out that calling 'sync' even directly after changing the music volume doesn't change anything, sorry :/
Also, I found out that I only need to call the set music volume command twice to get it working, so I could reduce the loops down to 'for i = 1 to 2'

[href][/href]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Jun 2013 21:32 Edited at: 7th Jun 2013 21:34
Try this with the sync immediate...



SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 7th Jun 2013 21:53 Edited at: 7th Jun 2013 22:02
Thanks Pincho, but you see that involves 'set music volume' being called more than once, so it should work ok.
What I'm saying is that single calls to the command alone don't seem to do anything anymore. :/
I've been doing a few more tests, and it seems that the actual music volume is 'lagging' one change behind the volume you're trying to set it at.
I found if you run this code:


The music will play at 70% volume (although 'music volume(1)' claims it's at 10% volume)... See what I mean? If I then added another 'set music volume' line into that code, whatever I changed it to, the music would then play at 10% volume, because it's just caught up with the second music command!
I'm starting to get the feeling this isn't a well known 7.7 bug :/
Maybe it's something that's just happening on my computer? idk :/

EDIT: Just realized, 'set music speed' seems to have exactly the same bug. For me anyways

[href][/href]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Jun 2013 22:10
load music 'music.mp3', 1
set music volume 1, 70
set music volume 1, 10
play music 1
wait key

That's why I said use sync...

load music 'music.mp3', 1
set music volume 1, 70
sync
set music volume 1, 10
sync
play music 1
wait key

SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 7th Jun 2013 22:17
Sorry Pincho, even with the sync commands added in, the music still plays at 70% volume, even after it's been set to play at 10% volume

[href][/href]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Jun 2013 22:20
It's a bug like you said then.

SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 7th Jun 2013 22:44
Ah, ok :/
I was wondering if anyone else had to deal with the same thing?
I'm guessing not though? :/

[href][/href]
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 7th Jun 2013 23:06
I've never noticed this problem and use mp3 music. I'll give it another look later when I can. I'm able to set volume in a similar/same manner and have it work correctly from what I can tell.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Jun 2013 11:25
You could have gone to the Bug Reports board and searched for "music". Then you would have found this:

http://forum.thegamecreators.com/?m=forum_view&t=175929&b=15
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 10th Jun 2013 23:54
Oh well, looks like this is something I'll just have to work around
@Green Gandalf You're right, sorry, I should have checked out bug reports first! It seems to be pretty much the same problem I'm having, although most of the people are saying mp3s work fine for them, even if Midi files don't

Thanks for the help!

[href][/href]
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 11th Jun 2013 02:15 Edited at: 11th Jun 2013 02:16
Strange I'm using MP3 and I have no problems adjusting volume up and down and max/Off with In game controls.

Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 11th Jun 2013 07:30
You could try the Enhanced Audio plugin.

Ten minutes to Wapner.
Unlocker
13
Years of Service
User Offline
Joined: 26th Jul 2012
Location:
Posted: 15th Jun 2013 06:00
I have some issue on update 7.62
I solved this by using double command "set music voume"
I try some audio plugins but not all of them work perfect on every OS, so using double command - is not hi price for app with no issues.

the truth is out there
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jun 2013 12:00
7.62 shouldn't be bugged. It's the sync that's missing.

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 16th Jun 2013 00:00
Quote: "I have some issue on update 7.62
I solved this by using double command "set music voume"
I try some audio plugins but not all of them work perfect on every OS, so using double command - is not hi price for app with no issues."


I've stated above that I had no issues with setting MUSIC volume. But I just checked my codes and I've been simply calling the command twice in a row to make it work. So I forgot I ran into this problem but completely solved it.

Setting music volume isn't a repetitive performance degrading task. Calling the command to set the music volume twice in a row shouldn't be a problem for anyone.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jun 2013 14:31
I wonder why that works? Weird.
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 21st Jun 2013 00:55
Oh well, thanks for all the replies! I guess I'll just note it down as something I have to work around

Login to post a reply

Server time is: 2026-07-06 16:49:27
Your offset time is: 2026-07-06 16:49:27