public bool IsPlaying(int channel = -1) { if (channel == MusicChannel) { return(SDL_mixer.Mix_PlayingMusic() == 1); } else { return(SDL_mixer.Mix_Playing(channel) == 1); } }
private void StopChannel() { if (Channel < 0) { return; } var isPlayimg = SDL_mixer.Mix_Playing(Channel) == 1; if (isPlayimg) { SDL_mixer.Mix_HaltChannel(Channel); } Channel = -1; }
internal static void ArreterJouerSon(String son) { int id_canal = sons.Keys.ToList().IndexOf(son); // Son non trouvé if (id_canal == -1) { return; } // Son non joué if (SDL_mixer.Mix_Playing(id_canal) == 0) { return; } SDL_mixer.Mix_HaltChannel(id_canal); }
internal static void JouerSon(String son) { int id_canal = sons.Keys.ToList().IndexOf(son); // trop de canaux utilisés if (id_canal == -1) { return; } // Son déjà joué if (SDL_mixer.Mix_Playing(id_canal) > 0) { return; } SDL_mixer.Mix_PlayChannel(id_canal, sons[son], 0); }
public int NumChannelsPlaying() { return(SDL_mixer.Mix_Playing(-1)); }
private bool IsPlaying() => Channel >= 0 && SDL_mixer.Mix_Playing(Channel) == 1 && SDL_mixer.Mix_Paused(Channel) == 0;