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.

Bug Reports / Set music volume

Author
Message
bfrnhout
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Vlissingen
Posted: 22nd Sep 2010 23:50
It seems to me that there is still a problem with the command
SET MUSIC VOLUME.
I load a MP3 file and its play the music in full volume (100) i can change the volume i even can call back the value i did set for the new volume. but nathing is happening at the volume. even if i set it to 0 its still playing at 100.

I did see a lot of post about this but not one awnser. how is this problem solved.

Games is live so to live do the games
bfrnhout
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Vlissingen
Posted: 23rd Sep 2010 22:29
A littile correction on the SET MUSIC VOLUME.

Instead of a MP3 file its a MID file that i loaded and i am not be able to change the volume of the sound.

A second problem i found out is the sound volume.
I have a screen where there are buttons on. When i go over it with the mouse the sound is dimming. until its totaly gone. As soon as i go to another screen and back the same thing happend again. even when i request the SOUND VOLUME and it says 100 then still the sound is completly gone.

What is this for a problem i can send the file and media with it so it can be tested.

Games is live so to live do the games
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 25th Sep 2010 15:20
I had exactly the same problem setting the volume for audio (wav) files. I ended up using the `Torrey EAP Plugin` for playing audio.
CSL
15
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: USA
Posted: 20th Nov 2010 05:28 Edited at: 20th Nov 2010 05:28
Same problem happening in my game. Loaded a .mid file, and it always plays at full volume even when volume is reduced with set music volume.

.mid file attached for the GameCreators to investigate.

CSL

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Nov 2010 13:35
I agree.

I get exactly the problem bfrnhout described in the first post.

Here's my test code using CSL's midi file

Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 20th Nov 2010 14:00
In GDK I don't know if this is related but when I load sound no matter if I set the sound volume or not it plays at 100%, resulting in a loop of sounds while loading that doesn't sound pleasant.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Nov 2010 22:18
Dodga

Give sample code plus media.
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 23rd Nov 2010 00:51 Edited at: 23rd Nov 2010 01:45
[Edit]

looks like m_ptr->pBasicAudio->put_Volume needs to be set up somewhere in initialization to set the IBasicAudio Interface at a default volume of 100 at start. Otherwise, a program will always get the last set volume level from the IBasicAudio Interface at it's startup. That will throw people off especially if it wasn't set at 100% in a previous run.


-------------------------------------

I get the same as everyone above:

2 things on the sound test:

1) .wav sound wont play in the application unless the application has focus( note: not saying this is a bug ).

2) Sound volume control is there, but sound seems to cut off around level 50 and it being the highest at level 100. Doesn't make sense to not make use of 0-100 volume levels.

Razor Slate.wav
Found at:
Dark Basic Professional Online\Media\Sounds\Super Weapons
Sound test code: [ press a,d to change volume ]


2 things on the midi music test:

1) The midi music volume works just as the sound volume for me. Level 50 for music cut off and 100 for highest volume level.

2) The last set volume for music seems to be saved somewhere (registry?). So if I end the program with music volume set at 80, then run the program again after that, the music volume will play at level 80 even though the music volume command reports it at 100.

Music1.mid
Dark Basic Professional Online\Help\examples\music\music
Midi Music Test Code: [ press a,d to change volume ]


ExoDev.Com - A Game Development Community Website! Featuring: XBOX360 CONTROLLER LIBRARY
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 28th Nov 2010 17:39
Yepp, I'm getting this also, used to work fine in older versions. As far as I know mp3's are ok, but not tested as yet. Midi files however seem to play at full whack even when you can see the volume is being altered on screen. Due to Warner Brothers declaring Blue Danube their property due to '2001 a Space Oddessy'(a bit fickle as I guess they chose that music because it was free to use, Strauss isn't exactly a modern artist), I have replaced an mp3 with a midi for a test video, seeing as I want peeps to be able to view it. At the min though the music is blasting out something terrible lol. Perhaps I will have to hum the tune and use that.

http://s6.bitefight.org/c.php?uid=103081
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Nov 2010 22:27
I've been working on this over the past week and I haven't found a way to control midi volume directly, and TBH, I don't think that's ever worked (and Lee agrees with me in a short email discussion we had).

The recent changes I've made will now allow volume change to midi, but volume is controlled at the application level, like it is for CD music - unfortunately that has the side-effect of affecting all volume for all music and sound.

That's the best that I can do right now I'm afraid, unless I write or acquire a midi player library that can be integrated with DBPro.

If that's not good enough, then you can try one of the many free midi-to-mp3 converters that are available.

Quote: "looks like m_ptr->pBasicAudio->put_Volume needs to be set up somewhere in initialization"

Done that too, as part of the reorg of the music library - it's now arranged around more OO lines, which simplifies future maintenance somewhat. Take a look

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 8th Jan 2011 17:02 Edited at: 8th Jan 2011 17:18
IanM, sorry for not getting back sooner on this and mabie you already figured this out, but just in case...

Looking through the DBPro SDK code I have ( pre-reorganized music library era ), I saw in the SetSoundVolume and SoundMusicVolume functions where the algorithm used to set the volumes were not converted to a linear scale to make full use of a 0-100 sound range. Also note that the "->put_Volume" and "->SetVolume" uses a logarithmic scale. With this new algorithm, I can hear the full range now.

If you want to test this, here is the code I have...

In function SetMusicVolume found in CMusicC.cpp:
(Updated code in the "else block")


In function SetSoundVolume found in CSoundC.cpp


So, instead of only able to hear audio in the 35-40 to 100 range, I'm able to hear 1-100 range, 0 being quite, for sounds and midi music now.

Here's the dbpro code I used to test with...

For midi music:
Music1.mid
Dark Basic Professional Online\Help\examples\music\music
Midi Music Test Code: [ press a,d to change volume ]


For .wav sound:
Razor Slate.wav
Found at:
Dark Basic Professional Online\Media\Sounds\Super Weapons
Sound test code: [ press a,d to change volume ]



EDIT: Also tested CLS's goodbadugly.mid and the volume works for me with it. No clue what could be the problem on why they can't change the volume. Will test a mp3 here in a bit.

EDIT2: Tested some mp3 files and they work for me also. I have a SoundBlaster Audigy 4 soundcard. I wonder if it's a soundcard issue for them to not being able to change the volume?? Just a guess...

ExoDev.Com - A Game Development Community Website! Featuring: XBOX360 CONTROLLER LIBRARY
Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 9th Jan 2011 11:03
im having some issues with the audio too in Dark GDK. when i run two instances of the same program one is louder than the other one. will try to replicate the error

hi
Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 13th Jan 2011 14:11 Edited at: 13th Jan 2011 14:12
ok, i found out that when the application is out of focus, and you run this command, it ignores it completely, dbSetSoundVolume and the one for the music too. i use dark GDK version 7.5b i think, so this must be the same problem.

Edit: sorry about the double post :/

hi

Login to post a reply

Server time is: 2024-04-19 18:46:42
Your offset time is: 2024-04-19 18:46:42