Jump to content

Getting audio type


jeti140973

Recommended Posts

Hm, do you guys know of a way to determine the "category" of an audio source? Ie. whether the audio source is part of the music, ambience, UI or spacecraft sounds? Reason I ask, is that my mod now lowers the volume of all sources gradually while ascending out of atmosphere, and gradually increases it as well when reentering atmosphere. It is a great effect, I think, but there is a problem. I need to keep the volumes within the settings set by the user in the main menu, so that music is not increases if the user has disabled all music. But then I need to know what type of audio source I am iterating through. Help appreciated :-)

Link to comment
Share on other sites

Hope you get your answer -- your mod that removed all the audio except breathing was one of the best I've ever used and 0.21 hasn't been the same without it. I've been checking your old thread every day hoping to see an update. :P

Link to comment
Share on other sites

Hm, do you guys know of a way to determine the "category" of an audio source? Ie. whether the audio source is part of the music, ambience, UI or spacecraft sounds? Reason I ask, is that my mod now lowers the volume of all sources gradually while ascending out of atmosphere, and gradually increases it as well when reentering atmosphere. It is a great effect, I think, but there is a problem. I need to keep the volumes within the settings set by the user in the main menu, so that music is not increases if the user has disabled all music. But then I need to know what type of audio source I am iterating through. Help appreciated :-)

You could adjust:

GameSettings.AMBIENCE_VOLUME = val
GameSettings.MUSIC_VOLUME = val
GameSettings.SHIP_VOLUME = val
GameSettings.UI_VOLUME = val
GameSettings.VOICE_VOLUME = val

And then apply changes with:

AudioFXSettings.Apply();

Just remember to save the original values from the GameSettings variables I mentioned and then restore them later. :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...