diff options
Diffstat (limited to 'plugins/eg-sampler.lv2')
-rw-r--r-- | plugins/eg-sampler.lv2/sampler.c | 8 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/sampler_ui.c | 2 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/uris.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index d870a07..4c5a92a 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -249,9 +249,9 @@ work(LV2_Handle instance, static LV2_Worker_Status work_response(LV2_Handle instance, uint32_t size, const void* data) { - Sampler* self = (Sampler*)instance; - Sample* old_sample = self->sample; - Sample* new_sample = *(Sample* const*)data; + Sampler* self = (Sampler*)instance; + Sample* old_sample = self->sample; + const Sample* new_sample = *(Sample* const*)data; // Install the new sample self->sample = *(Sample* const*)data; @@ -353,7 +353,7 @@ deactivate(LV2_Handle instance) } /** Define a macro for converting a gain in dB to a coefficient. */ -#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g)*0.05f) : 0.0f) +#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f) /** Handle an incoming event in the audio thread. diff --git a/plugins/eg-sampler.lv2/sampler_ui.c b/plugins/eg-sampler.lv2/sampler_ui.c index 16a8c71..fc879eb 100644 --- a/plugins/eg-sampler.lv2/sampler_ui.c +++ b/plugins/eg-sampler.lv2/sampler_ui.c @@ -421,7 +421,7 @@ ui_hide(LV2UI_Handle handle) static int ui_idle(LV2UI_Handle handle) { - SamplerUI* ui = (SamplerUI*)handle; + const SamplerUI* ui = (const SamplerUI*)handle; if (ui->window) { gtk_main_iteration_do(false); } diff --git a/plugins/eg-sampler.lv2/uris.h b/plugins/eg-sampler.lv2/uris.h index f934390..3d3ac10 100644 --- a/plugins/eg-sampler.lv2/uris.h +++ b/plugins/eg-sampler.lv2/uris.h @@ -164,7 +164,7 @@ read_set_file(const SamplerURIs* uris, const LV2_Atom_Object* obj) return NULL; } - return (const char*)LV2_ATOM_BODY_CONST(value); + return (const char*)&value[1]; } #endif /* SAMPLER_URIS_H */ |