import {TMGAudioEffectCtrl} from './TMGAudioEffectCtrl'

export class TMGAudioEffectCtrlImpl implements TMGAudioEffectCtrl {
  private audioEffectCtrl: TMGAudioEffectCtrlBindings|undefined;

  constructor(contextBindings: TMGContextBindings) {
    this.audioEffectCtrl = new TMGAudioEffectCtrlBindings(contextBindings);
  }

  StartPlayMusic(soundId: number, filePath: string, loopCount: number): number {
    return this.audioEffectCtrl.startPlayMusic(soundId, filePath, loopCount);
  };

  StopPlayMusic(soundId: number): number {
    return this.audioEffectCtrl.stopPlayMusic(soundId);
  };

  PausePlayMusic(soundId: number): number {
    return this.audioEffectCtrl.pausePlayMusic(soundId);
  };

  ResumePlayMusic(soundId: number): number {
    return this.audioEffectCtrl.resumePlayMusic(soundId);
  };

  IsMusicPlayEnd(soundId: number): boolean {
    return this.audioEffectCtrl.isMusicPlayEnd(soundId);
  };

  SetAllMusicVolume(volume: number): number {
    return this.audioEffectCtrl.setAllMusicVolume(volume);
  };

  SetMusicPublishVolume(soundId: number, volume: number): number {
    return this.audioEffectCtrl.setMusicPublishVolume(soundId, volume);
  };

  GetMusicPublishVolume(soundId: number): number {
    return this.audioEffectCtrl.getMusicPublishVolume(soundId);
  };

  SetMusicPlayoutVolume(soundId: number, volume: number): number {
    return this.audioEffectCtrl.setMusicPlayoutVolume(soundId, volume);
  };

  GetMusicPlayoutVolume(soundId: number): number {
    return this.audioEffectCtrl.getMusicPlayoutVolume(soundId);
  };

  SetMusicPitch(soundId: number, pitch: number): number {
    return this.audioEffectCtrl.setMusicPitch(soundId, pitch);
  };

  GetMusicDurationInMS(soundId: number): number {
    return this.audioEffectCtrl.getMusicDurationInMS(soundId);
  };

  GetMusicCurrentPosInMS(soundId: number): number {
    return this.audioEffectCtrl.getMusicCurrentPosInMS(soundId);
  };

  SeekMusicToPosInTime(soundId: number, time: number): number {
    return this.audioEffectCtrl.seekMusicToPosInTime(soundId, time);
  };

  EnableMusicPublish(soundId: number, enable: boolean): number {
    return this.audioEffectCtrl.enableMusicPublish(soundId, enable);
  };

  EnableMusicPlayout(soundId: number, enable: boolean): number {
    return this.audioEffectCtrl.enableMusicPlayout(soundId, enable);
  };

  SetVoiceType(type: number): number {
    return this.audioEffectCtrl.setVoiceType(type);
  };

  SetKaraokeType(type: number): number {
    return this.audioEffectCtrl.setKaraokeType(type);
  };

  StartRecord(filePath: string, content: number): number {
    return this.audioEffectCtrl.startRecord(filePath, content);
  };

  StopRecord(): number {
    return this.audioEffectCtrl.stopRecord();
  };

  StartSystemAudioLoopback(playerPath: string): number {
    return this.audioEffectCtrl.startSystemAudioLoopback(playerPath);
  };

  StopSystemAudioLoopback(): number {
    return this.audioEffectCtrl.stopSystemAudioLoopback();
  };

  SetSystemAudioLoopbackVolume(volume: number): number {
    return this.audioEffectCtrl.setSystemAudioLoopbackVolume(volume);
  };
}