示例#1
0
 private void OnAudioPlayerStateChanged(AudioPlayerState audioPlayerState)
 {
     if (audioPlayerState != AudioPlayerState)
     {
         AudioPlayerState = audioPlayerState;
         AudioPlayerStateChanged.Invoke(audioPlayerState);
     }
 }
 private void SetAudioPlayerStatus(AudioPlayerState audioPlayerState = AudioPlayerState.Closed)
 {
     if (audioPlayerState != _audioPlayerState)
     {
         _audioPlayerState = audioPlayerState;
         if (_audioPlayerState == AudioPlayerState.Stopped)
         {
             Finished?.Invoke(this, new EventArgs());
         }
         AudioPlayerStateChanged?.Invoke(audioPlayerState);
     }
 }