Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Some general sound questions  (Read 4810 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Some general sound questions
« on: November 11, 2007, 05:18:54 PM »

Afternoon,

I'm looking at adding in some sliders to control the three sounds - speech, music, and sfx, and I think that is quite simple, but I just need a little clarification on some things.

For example, in the docs, it says this: "SetGlobalMusicVolume(percent)", so my question is what is the "percent" actually a percentage of? Does setting this value to 100 mean that I have set the volume to its maximum? But in the registry settings for the demo game, the volume settings are all 200. Does that mean the demo game volumes are all 200%? But again, 200% of what? Of my computer's volume setting?

Also, do I need to store the volume settings in the inventory? Or will they be stored in a save game file?

Thanks.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Some general sound questions
« Reply #1 on: November 12, 2007, 08:59:38 AM »

You don't need to worry about what the engine stores in the registry, those are internal settings.
And they are restored when you run the game again, volume settings are not part of the saved game.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Some general sound questions
« Reply #2 on: November 12, 2007, 10:40:36 AM »

Ok - but what is the "percent" a percentage of exactly? Does setting the volume to 100 mean that that is 100% of my computer's volume setting as it currently is? Or what?

For example, the "volume" level on my computer (when doubl clicking the speaker icon) is almost at the bottom because that is where it's best, so if I set the volume in WME to 100 does it mean it will be the same as my computer's current level, or does it mean, it will put the computer volume up to the maximum?

Hope I'm making sense.  8)

And how do I write the volume level that the user sets in the game, to the registry? Are you saying that the volume values already in the registry are irrelevent? And that I should create a new registry entry to store the volume settings? And do I set the value of that new entry to the "percent" volume that is selected by moving the volume sliders?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Some general sound questions
« Reply #3 on: November 12, 2007, 10:59:54 AM »

The individual speech/sfx/music volumes are set as percentage of your current volume, whereas the global volume actually modifies the Windows wave out volume.

As for storing in registry, it's done automatically. When you quit the game, it saves current values. When you re-run the game, it loads the previous settings.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Some general sound questions
« Reply #4 on: November 12, 2007, 12:09:48 PM »

Hmmm, I'm getting more confused now.  ;D

Currently in WME I'm setting the global volume like "SetGlobalMusicVolume" because I assumed that would then simply affect ALL the music in the same way. Whereas I thought "SetMusicVolume" only affected the currenty playing music?

So, what happens if I SetMusicVolume but then want to start another piece of music? Since I have stopped the currently playing sound, do I then need to reset the volume for the new sound? How will that work with having the player set volumes? Do I just set a simple variable value when they move the slider, and then set each new piecve of music to equal that variable?

Also, if setting the global volume to 100 means my computers output it set to it's maximum - I don't get that. I set the speech to 85, but my computer volume is no way 85% of what it could be - it's more like 20%. BUT, the speech in the game is lower than it is when I play the file outside the engine.

So, basically, how can I control the game wide audio, without affecting a person's personal computer volume settings?

And if it's automatically stored in the registry, how do I then get that information from the registry to set the slider positions?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Some general sound questions
« Reply #5 on: November 12, 2007, 04:02:26 PM »

Quote
Currently in WME I'm setting the global volume like "SetGlobalMusicVolume" because I assumed that would then simply affect ALL the music in the same way. Whereas I thought "SetMusicVolume" only affected the currenty playing music?
That's right. Note that everything I wrote above applies to the Game.SetGlobalXXXVolume() methods. The "non global" methods indeed affect only the currently playing sounds. The global methods affect playing sounds AND any subsequently started sounds.

Quote
So, basically, how can I control the game wide audio, without affecting a person's personal computer volume settings?
You don't. The master volume affect the system volume settings. The other settings (music/sfx/speech) are percentages relative to the master volume.

Quote
And if it's automatically stored in the registry, how do I then get that information from the registry to set the slider positions?
Using the Game.GetGlobalXXXVolume() methods.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Some general sound questions
« Reply #6 on: November 12, 2007, 05:01:22 PM »

So, the global volumes affect the "wave" slider in the windows volume control? NOT, the master volume slider on the left side?

But there are three global volumes in WME, but only one wave output in the windows volume controls. So, if I set all three global volumes to different levels, how can that affect my windows wave volume?

Are the windows volume settings restored when we quit WME? Because all my windows volumes are in the same place that they were when I launched the game, even though I'm setting the global volumes in WME.

I'm really not trying to be difficult here.  :) I'm just trying to understand this. Maybe this could be added to the "improve the docs" section?  ;)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Some general sound questions
« Reply #7 on: November 13, 2007, 10:34:25 AM »

So, the global volumes affect the "wave" slider in the windows volume control? NOT, the master volume slider on the left side?
Yup.


But there are three global volumes in WME, but only one wave output in the windows volume controls. So, if I set all three global volumes to different levels, how can that affect my windows wave volume?
Only Game.SetGlobalMasterVolume() does that. Again, the other three (speech, sfx, music) are relative to the master volume.


Are the windows volume settings restored when we quit WME?
Yes.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Some general sound questions
« Reply #8 on: November 13, 2007, 03:32:11 PM »

Ok man - I think I get it all now - well, enough to do what I need anyway.

Thanks.  8)
Logged
 

Page created in 0.022 seconds with 22 queries.