/** * @brief Preload background music * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo */ public void PreloadBackgroundMusic(string pszFilePath) { if (_NoAudioHardware) { return; } SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode()); }
public void PlayBackgroundMusic(string filename, bool loop = false) { if (null == filename) { return; } SharedMusic.Open(FullPath(filename), filename.GetHashCode()); SharedMusic.Play(loop); }
/** * @brief Play background music * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo * @param bLoop Whether the background music loop or not */ public void PlayBackgroundMusic(string pszFilePath, bool bLoop) { if (null == pszFilePath) { return; } SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode()); SharedMusic.Play(bLoop); }
public void PreloadBackgroundMusic(string filename) { SharedMusic.Open(FullPath(filename), filename.GetHashCode()); }
/** * @brief Preload background music * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo */ public void PreloadBackgroundMusic(string pszFilePath) { SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode()); }