From 4e4d8eff4b781cd8c065aba38783e121ab91765c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Dec 2013 16:50:36 +0000 Subject: Fix vector size calculation (patch from Robin Gareus). --- plugins/eg05-scope.lv2/examploscope_ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/eg05-scope.lv2/examploscope_ui.c b/plugins/eg05-scope.lv2/examploscope_ui.c index 3e014f0..4061ff9 100644 --- a/plugins/eg05-scope.lv2/examploscope_ui.c +++ b/plugins/eg05-scope.lv2/examploscope_ui.c @@ -553,7 +553,7 @@ recv_raw_audio(EgScopeUI* ui, const LV2_Atom_Object* obj) } // Number of elements = (total size - header size) / element size - const size_t n_elem = ((data_val->size - sizeof(LV2_Atom_Vector)) + const size_t n_elem = ((data_val->size - sizeof(LV2_Atom_Vector_Body)) / sizeof(float)); // Float elements immediately follow the vector body header -- cgit v1.2.1