MichelVGameMaker

audio_save_base_gains

May 18th, 2020
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///@function audio_save_base_gains()
  2. ///@description save gain settings for all audio assets. Intended to be used once on game start to save the gains as defined in the IDE in the audio editor
  3.  
  4. var _debug_string = "The starting gains were saved for ";
  5. for (i=0; audio_exists(i); i++)
  6. {
  7.     sound_base_gains_array[i] = audio_sound_get_gain(i);
  8.     _debug_string += "\n" + audio_get_name(i) + ": " + string(audio_sound_get_gain(i)); //
  9. }
  10. _debug_string += "\n" + string_format(i, 0, 0) + " sounds saved.";  
  11. show_debug_message(_debug_string);
  12. return sound_base_gains_array;
Add Comment
Please, Sign In to add comment