// SPDX-License-Identifier: Unlicense

#ifndef SFXPLUGINCLAP_H
#define SFXPLUGINCLAP_H

#include "configuration.h"

#ifdef SHR3D_SFX_PLUGIN_CLAP

#include "type.h"

#include <string>
#include <vector>

namespace SfxPluginClap
{
  void init(std::vector<std::string>& sfxNames);

  bool hasSfxPluginWindow(SfxIndex index);
  void openWindow(SfxIndex index, i32 instance);
  void parentWindow(SfxIndex index, i32 instance, Shr3DWindow parentWindow);
  Size getSfxPluginWindowSize(SfxIndex index, i32 instance);
  void closeWindow(SfxIndex index, i32 instance);

  i32 numParams(SfxIndex index, i32 instance);
  void getParameterProperties(SfxIndex index, i32 instance, i32 param, SfxParameterProperties& parameterProperties);
  f32 getParameter(SfxIndex index, i32 instance, i32 param);
  void setParameter(SfxIndex index, i32 instance, i32 param, f32 value);

  void processBlock(SfxIndex index, i32 instance, f32** inBlock, f32** outBlock, i32 blockSize);

  std::string saveParameters(SfxIndex index, i32 instance);
  void loadParameters(SfxIndex index, i32 instance, const std::string& parameters);
}

#endif // SHR3D_SFX_PLUGIN_CLAP

#endif // SFXPLUGINCLAP_H
