Turn a-fluidsynth into C++

This commit is contained in:
Robin Gareus 2016-12-06 16:00:42 +01:00
parent 8d8132aa3c
commit 9c20892c27
2 changed files with 6 additions and 6 deletions

View file

@ -611,7 +611,7 @@ restore (LV2_Handle instance,
const void* value = retrieve (handle, self->afs_sf2file, &size, &type, &valflags);
if (value) {
strncpy (self->queue_sf2_file_path, value, 1023);
strncpy (self->queue_sf2_file_path, (const char*) value, 1023);
self->queue_sf2_file_path[1023] = '\0';
self->queue_reinit = true;
}
@ -648,7 +648,7 @@ mn_file (LV2_Handle instance)
}
// TODO collect program info during load_sf2();
rv = calloc (1, sizeof (char));
rv = (char*) calloc (1, sizeof (char));
#define pf(...) \
do { \
@ -728,7 +728,7 @@ static char*
mn_model (LV2_Handle instance)
{
AFluidSynth* self = (AFluidSynth*)instance;
char* rv = malloc (64 * sizeof (char));
char* rv = (char*) malloc (64 * sizeof (char));
snprintf (rv, 64, "%s:%p", AFS_URN, (void*) self);
rv[63] = 0;
return rv;

View file

@ -35,10 +35,10 @@ def build(bld):
LIB_EXT = module_ext)
# Build plugin library
obj = bld(features = 'c cshlib',
source = 'a-fluidsynth.c',
obj = bld(features = 'cxx cshlib',
source = 'a-fluidsynth.cc',
name = 'a-fluidsynth',
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
cxxflags = [ '-fPIC' ],
includes = [ '../../ardour' ],
target = '../../LV2/%s/a-fluidsynth' % bundle,
install_path = '${LV2DIR}/%s' % bundle,