aboutsummaryrefslogtreecommitdiff
path: root/props.lv2
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-04-11 09:39:10 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-04-11 09:39:10 +0200
commit6b777c7417e8d859c5a8bd434d5c465185dca358 (patch)
treed6468d9a4cb11dbf1f2c46d5a5fb1c53de8cc659 /props.lv2
parentffffe6db64e3678ad17aeb52bc59d0b19b29f481 (diff)
parent974ce6c4db3cfa9b40e16027544d33d882b6ce7f (diff)
downloadsynthpod-6b777c7417e8d859c5a8bd434d5c465185dca358.zip
synthpod-6b777c7417e8d859c5a8bd434d5c465185dca358.tar.gz
synthpod-6b777c7417e8d859c5a8bd434d5c465185dca358.tar.bz2
synthpod-6b777c7417e8d859c5a8bd434d5c465185dca358.tar.xz
Merge commit '974ce6c4db3cfa9b40e16027544d33d882b6ce7f' into meson
Diffstat (limited to 'props.lv2')
-rw-r--r--props.lv2/props.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/props.lv2/props.h b/props.lv2/props.h
index 6151b8d..463e123 100644
--- a/props.lv2/props.h
+++ b/props.lv2/props.h
@@ -125,7 +125,7 @@ struct _props_t {
#define PROPS_T(PROPS, MAX_NIMPLS) \
props_t (PROPS); \
- props_impl_t _impls [(MAX_NIMPLS)];
+ props_impl_t _impls [(MAX_NIMPLS)]
// rt-safe
static inline int
@@ -176,13 +176,11 @@ props_restore(props_t *props, LV2_State_Retrieve_Function retrieve,
*****************************************************************************/
// enumerations
-typedef enum _props_state_t props_state_t;
-
-enum _props_state_t {
+typedef enum _props_state_t {
PROP_STATE_NONE = 0,
PROP_STATE_LOCK = 1,
PROP_STATE_RESTORE = 2
-};
+} props_state_t;
static inline void
_props_impl_spin_lock(props_impl_t *impl, int from, int to)
@@ -434,8 +432,8 @@ _props_impl_init(props_t *props, props_impl_t *impl, const props_def_t *def,
impl->property = property;
impl->access = access;
impl->def = def;
- impl->value.body = value_base + def->offset;
- impl->stash.body = stash_base + def->offset;
+ impl->value.body = (uint8_t *)value_base + def->offset;
+ impl->stash.body = (uint8_t *)stash_base + def->offset;
uint32_t size;
if( (type == props->urid.atom_int)
@@ -617,7 +615,6 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
for(unsigned i = 0; i < props->nimpls; i++)
{
props_impl_t *impl = &props->impls[i];
- const props_def_t *def = impl->def;
if(*ref)
*ref = _props_patch_set(props, forge, frames, impl, sequence_num);
@@ -633,8 +630,6 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{
*ref = _props_patch_set(props, forge, frames, impl, sequence_num);
- const props_def_t *def = impl->def;
-
return 1;
}
else if(sequence_num)
@@ -859,8 +854,8 @@ props_save(props_t *props, LV2_State_Store_Function store,
if( map_path && (impl->type == props->urid.atom_path) )
{
const char *path = strstr(body, "file://")
- ? body + 7 // skip "file://"
- : body;
+ ? (char *)body + 7 // skip "file://"
+ : (char *)body;
char *abstract = map_path->abstract_path(map_path->handle, path);
if(abstract)
{
@@ -884,7 +879,8 @@ props_save(props_t *props, LV2_State_Store_Function store,
static inline LV2_State_Status
props_restore(props_t *props, LV2_State_Retrieve_Function retrieve,
- LV2_State_Handle state, uint32_t flags, const LV2_Feature *const *features)
+ LV2_State_Handle state, uint32_t flags __attribute__((unused)),
+ const LV2_Feature *const *features)
{
const LV2_State_Map_Path *map_path = NULL;