public ChannelInfo(Channel channel, IMediaFile file, Action playNextFileAction)
 {
     this.Channel = channel;
     this.Channel.getSystemObject(out system).ERRCHECK();
     this.File = file;
     this.playNextFileAction = playNextFileAction;
     this.channelEndCallback = new FMOD.CHANNELCONTROL_CALLBACK(ChannelEndCallback);
     this.Channel.setCallback(this.channelEndCallback).ERRCHECK();
     this.Volume = 0f;
 }
 public void CleanUp()
 {
     if (this.Channel.hasHandle())
     {
         this.Channel.setVolume(0f).ERRCHECK(RESULT.ERR_INVALID_HANDLE);
         this.Channel.setPaused(true).ERRCHECK(RESULT.ERR_INVALID_HANDLE);
         this.Channel.setCallback(null).ERRCHECK(RESULT.ERR_INVALID_HANDLE);
         this.Channel.clearHandle();
     }
     this.channelEndCallback = null;
     this.File.State         = PlayerState.Stop;
     this.File = null;
     this.playNextFileAction = null;
 }