// SPDX-License-Identifier: Unlicense

#ifndef SFXPLUGINVST3_H
#define SFXPLUGINVST3_H

#include "configuration.h"

#ifdef SHR3D_SFX_PLUGIN_VST3

#include "type.h"

#include <string>

namespace SfxPluginVst3
{
  void init(std::vector<std::u8string>& sfxNames);

  bool hasSfxPluginWIndow(SfxIndex index);
  void openWindow(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::u8string saveParameters(SfxIndex index, i32 instance);
  void loadParameters(SfxIndex index, i32 instance, const std::u8string& parameters);
}

#endif // SHR3D_SFX_PLUGIN_VST3

#endif // SFXPLUGINVST3_H
