// Copyright (c) 2023 Tencent. All rights reserved.
// Author: felixyyan
#pragma once

#include <string>
#include "../include/av_audio_effect_ctrl.h"
#include "../include/av_type.h"
#include "bindings/sebind/sebind.h"
#include "tmg_context_bindings.h"

class TMGAudioEffectCtrlBindings {
 public:
  explicit TMGAudioEffectCtrlBindings(std::shared_ptr<TMGContextBindings> context_bindings);

  int startPlayMusic(int sound_id, const std::string& file_path, int loop_count);
  int stopPlayMusic(int sound_id);
  int pausePlayMusic(int sound_id);
  int resumePlayMusic(int sound_id);
  bool isMusicPlayEnd(int sound_id);
  int setAllMusicVolume(int volume);
  int setMusicPublishVolume(int sound_id, int volume);
  int getMusicPublishVolume(int sound_id);
  int setMusicPlayoutVolume(int sound_id, int volume);
  int getMusicPlayoutVolume(int sound_id);
  int setMusicPitch(int sound_id, float pitch);
  int getMusicDurationInMS(int sound_id);
  int getMusicCurrentPosInMS(int sound_id);
  int seekMusicToPosInTime(int sound_id, int time);
  int enableMusicPublish(int sound_id, bool enable);
  int enableMusicPlayout(int sound_id, bool enable);
  int setVoiceType(ITMG_VOICE_TYPE type);
  int setKaraokeType(ITMG_KARAOKE_TYPE type);
  int startRecord(const std::string& file_path, ITMG_AUDIO_RECORDING_CONTENT content);
  int stopRecord();
  int startSystemAudioLoopback(const std::string& player_path);
  int stopSystemAudioLoopback();
  int setSystemAudioLoopbackVolume(int volume);

 private:
  ITMGAudioEffectCtrl* audio_effect_ctrl_ = nullptr;
};
