23 lines
397 B
C
23 lines
397 B
C
#include "plugin.h"
|
|
#ifndef IDENTITY
|
|
#define IDENTITY 1
|
|
#endif
|
|
#ifndef GAIN
|
|
#define GAIN 2
|
|
#endif
|
|
#ifndef OFFSET
|
|
#define OFFSET 7
|
|
#endif
|
|
#ifndef ABI
|
|
#define ABI PLUGIN_ABI
|
|
#endif
|
|
static int64_t convert_value(int64_t value)
|
|
{
|
|
return value * GAIN + OFFSET;
|
|
}
|
|
const Plugin *plugin_entry(void)
|
|
{
|
|
static const Plugin plugin = {ABI, IDENTITY, GAIN, OFFSET, convert_value};
|
|
return &plugin;
|
|
}
|