public static SimpleAudioEngine sharedEngine() { if (SimpleAudioEngine.s_SharedEngine == null) { SimpleAudioEngine.s_SharedEngine = new SimpleAudioEngine(); } return(SimpleAudioEngine.s_SharedEngine); }
public void stopBackgroundMusic(bool bReleaseData) { if (bReleaseData) { SimpleAudioEngine.sharedMusic().Close(); return; } SimpleAudioEngine.sharedMusic().Stop(); }
/** @brief Get the shared Engine object,it will new one when first time be called */ public static SimpleAudioEngine sharedEngine() { if (null == s_SharedEngine) { s_SharedEngine = new SimpleAudioEngine(); } return s_SharedEngine; }
/** * @brief Get the shared Engine object,it will new one when first time be called */ public static SimpleAudioEngine sharedEngine() { if (null == s_SharedEngine) { s_SharedEngine = new SimpleAudioEngine(); } return(s_SharedEngine); }
public void playBackgroundMusic(string pszFilePath, bool bLoop) { if (pszFilePath == null) { return; } SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath)); SimpleAudioEngine.sharedMusic().Play(bLoop); }
public void end() { SimpleAudioEngine.sharedMusic().Close(); foreach (KeyValuePair <uint, EffectPlayer> keyValuePair in SimpleAudioEngine.sharedList()) { keyValuePair.Value.Close(); } SimpleAudioEngine.sharedList().Clear(); }
public void unloadEffect(string pszFilePath) { uint num = SimpleAudioEngine._Hash(pszFilePath); if (SimpleAudioEngine.sharedList().ContainsKey(num)) { SimpleAudioEngine.sharedList().Remove(num); } }
public void stopEffect(uint nSoundId) { foreach (KeyValuePair <uint, EffectPlayer> keyValuePair in SimpleAudioEngine.sharedList()) { if (nSoundId != keyValuePair.Key) { continue; } keyValuePair.Value.Stop(); } }
public uint playEffect(string pszFilePath, bool bLoop) { uint num = SimpleAudioEngine._Hash(pszFilePath); this.preloadEffect(pszFilePath); foreach (KeyValuePair <uint, EffectPlayer> keyValuePair in SimpleAudioEngine.sharedList()) { if (num != keyValuePair.Key) { continue; } keyValuePair.Value.Play(bLoop); } return(num); }
public void preloadEffect(string pszFilePath) { if (pszFilePath.Length <= 0) { return; } uint num = SimpleAudioEngine._Hash(pszFilePath); if (SimpleAudioEngine.sharedList().ContainsKey(num)) { return; } EffectPlayer effectPlayer = new EffectPlayer(); effectPlayer.Open(SimpleAudioEngine._FullPath(pszFilePath), num); SimpleAudioEngine.sharedList().Add(num, effectPlayer); }
public void pauseBackgroundMusic() { SimpleAudioEngine.sharedMusic().Pause(); }
public bool isBackgroundMusicPlaying() { return(SimpleAudioEngine.sharedMusic().IsPlaying()); }
public float getBackgroundMusicVolume() { return(SimpleAudioEngine.sharedMusic().Volume); }
public void preloadBackgroundMusic(string pszFilePath) { SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath)); }
public void setBackgroundMusicVolume(float volume) { SimpleAudioEngine.sharedMusic().Volume = volume; }
public void SaveMediaState() { SimpleAudioEngine.sharedMusic().SaveMediaState(); }
public void rewindBackgroundMusic() { SimpleAudioEngine.sharedMusic().Rewind(); }
public void resumeBackgroundMusic() { SimpleAudioEngine.sharedMusic().Resume(); }
public void RestoreMediaState() { SimpleAudioEngine.sharedMusic().RestoreMediaState(); }