Jump to content

BGM Music Load with Volume 0 !?


Recommended Posts

  • Premium

Disable loading BGM music/sounds when the player has the Volume set on 0.0
I speak about this ones when you open the client, login, select characterloading.

0706 17:55:00831 :: BGM/login_window.mp3 > 304 kb
0706 17:55:08657 :: BGM/characterselect.mp3 > 472 kb
0706 17:55:19083 :: BGM/enter_the_east.mp3 > 3.14 mb

But you can add the maps with specific songs to the list...

0706 18:26:21453 :: BGM/desert.mp3 > 3.61 mb
0706 18:36:17583 :: BGM/follow_war_god.mp3 > 4.63 mb
0706 18:38:00674 :: BGM/save_me.mp3 > 2.90 mb
... and more

Inside the Client Srcs file: SoundManager.cpp (MilesLib)
Search for the function and make the changes like bellow:

void CSoundManager::PlayMusic(DWORD dwIndex, const char * c_szFileName, float fVolume, float fVolumeSpeed)
{
  # add this
  if (GetMusicVolume() == 0.0)
    return;
  # add this
  
  if (dwIndex >= CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM)
    return;
  ...
}

The only one bug problem is that when an player changes an song with the volume 0 it will not load (ty @ Karbust) this can be fixed from python (root/uisystemoption.py)
When the player is choosing any song set the volume to 5/10% then load the mp3 file.

def __OnChangeMusic(self, fileName):
	# you can try
	snd.SetMusicVolume(0.1 * net.GetFieldMusicVolume())
	systemSetting.SetMusicVolume(0.1)

Sorry if it did not help you, and however to see the files loading without any use... It bothers me.
If you have an better way post it bellow and i will update the topic.

Edited by DemOnJR
  • kekw 1
  • Good 1
  • Love 3

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.