vamp-simple-host.cpp File Reference
`#include <vamp-hostsdk/PluginHostAdapter.h>`
`#include <vamp-hostsdk/PluginInputDomainAdapter.h>`
`#include <vamp-hostsdk/PluginLoader.h>`
`#include <iostream>`
`#include <fstream>`
`#include <set>`
`#include <sndfile.h>`
`#include <cstring>`
`#include <cstdlib>`
`#include "system.h"`
`#include <cmath>`
Include dependency graph for vamp-simple-host.cpp:

Go to the source code of this file.

## Macros

#define | HOST_VERSION "1.5"

## Enumerations

enum | Verbosity { PluginIds, PluginOutputIds, PluginInformation, PluginInformationDetailed }

## Functions

void | printFeatures (int, int, const Plugin::OutputDescriptor &, int, const Plugin::FeatureSet &, ofstream *, bool frames)
void | transformInput (float *, size_t)
void | fft (unsigned int, bool, double *, double *, double *, double *)
void | printPluginPath (bool verbose)
void | printPluginCategoryList ()
void | enumeratePlugins (Verbosity)
void | listPluginsInLibrary (string soname)
int | runPlugin (string myname, string soname, string id, string output, int outputNo, string inputFile, string outfilename, bool frames)
void | usage (const char *name)
int | main (int argc, char **argv)
static double | toSeconds (const RealTime &time)
static string | header (string text, int level)

## Macro Definition Documentation

## HOST_VERSION

#define HOST_VERSION "1.5"

Definition at line 74 of file vamp-simple-host.cpp.

Referenced by main().

## Enumeration Type Documentation

## Verbosity

enum Verbosity

Enumerator
PluginIds |
PluginOutputIds |
PluginInformation |
PluginInformationDetailed |

Definition at line 76 of file vamp-simple-host.cpp.

## Function Documentation

## printFeatures()

void printFeatures | ( | int | frame,
|  | int | sr,
|  | const Plugin::OutputDescriptor & | output,
|  | int | outputNo,
|  | const Plugin::FeatureSet & | features,
|  | ofstream * | out,
|  | bool | frames
| ) |  |

Definition at line 507 of file vamp-simple-host.cpp.

References toSeconds(), and Vamp::RealTime::toString().

Referenced by runPlugin().

## transformInput()

void transformInput | ( | float * | ,
|  | size_t |
| ) |  |

## fft()

void fft | ( | unsigned | int,
|  | bool | ,
|  | double * | ,
|  | double * | ,
|  | double * | ,
|  | double * |
| ) |  |

## printPluginPath()

void printPluginPath | ( | bool | verbose | ) |

Definition at line 578 of file vamp-simple-host.cpp.

Referenced by main().

## printPluginCategoryList()

void printPluginCategoryList | ( |  | ) |

Definition at line 828 of file vamp-simple-host.cpp.

References Vamp::PluginBase::getDescription(), Vamp::PluginBase::getMaker(), Vamp::PluginBase::getName(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::HostExt::PluginLoader::listPlugins(), and Vamp::HostExt::PluginLoader::loadPlugin().

Referenced by main().

## enumeratePlugins()

void enumeratePlugins | ( | Verbosity | verbosity | ) |

Definition at line 609 of file vamp-simple-host.cpp.

References Vamp::PluginBase::getCopyright(), Vamp::PluginBase::getDescription(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::HostExt::PluginLoader::getLibraryPathForPlugin(), Vamp::PluginBase::getMaker(), Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), Vamp::PluginBase::getName(), Vamp::Plugin::getOutputDescriptors(), Vamp::PluginBase::getParameterDescriptors(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::PluginBase::getPluginVersion(), Vamp::Plugin::getPreferredBlockSize(), Vamp::Plugin::getPreferredStepSize(), Vamp::PluginBase::getVampApiVersion(), header(), Vamp::HostExt::PluginLoader::listPlugins(), Vamp::HostExt::PluginLoader::loadPlugin(), PluginIds, PluginInformation, PluginInformationDetailed, PluginOutputIds, and Vamp::Plugin::TimeDomain.

Referenced by main().

## listPluginsInLibrary()

void listPluginsInLibrary | ( | string | soname | ) |

## runPlugin()

int runPlugin | ( | string | myname,
|  | string | soname,
|  | string | id,
|  | string | output,
|  | int | outputNo,
|  | string | inputFile,
|  | string | outfilename,
|  | bool | frames
| ) |  |

Definition at line 268 of file vamp-simple-host.cpp.

References Vamp::HostExt::PluginLoader::composePluginKey(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), Vamp::Plugin::getOutputDescriptors(), Vamp::Plugin::getPreferredBlockSize(), Vamp::Plugin::getPreferredStepSize(), Vamp::Plugin::getRemainingFeatures(), Vamp::HostExt::PluginInputDomainAdapter::getTimestampAdjustment(), Vamp::HostExt::PluginWrapper::getWrapper(), Vamp::Plugin::initialise(), Vamp::HostExt::PluginLoader::loadPlugin(), printFeatures(), and Vamp::Plugin::process().

Referenced by main().

## usage()

void usage | ( | const char * | name | ) |

Definition at line 95 of file vamp-simple-host.cpp.

References PLUGIN_SUFFIX.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 140 of file vamp-simple-host.cpp.

References enumeratePlugins(), HOST_VERSION, PluginIds, PluginInformation, PluginInformationDetailed, PluginOutputIds, printPluginCategoryList(), printPluginPath(), runPlugin(), usage(), VAMP_API_VERSION, and VAMP_SDK_VERSION.

## toSeconds()

static double toSeconds | ( | const RealTime & | time | ) |

static

Definition at line 501 of file vamp-simple-host.cpp.

References Vamp::RealTime::nsec, and Vamp::RealTime::sec.

Referenced by printFeatures().

## header()

static string header | ( | string | text,
|  | int | level
| ) |  |

static

Definition at line 598 of file vamp-simple-host.cpp.

Referenced by enumeratePlugins().