Instantiate ccmap on UI side
This commit is contained in:
parent
67b08f6663
commit
ccdbd4a61a
2 changed files with 6 additions and 0 deletions
|
|
@ -92,3 +92,7 @@ sfizz_lv2_ccmap *sfizz_lv2_ccmap_create(LV2_URID_Map* map);
|
|||
void sfizz_lv2_ccmap_free(sfizz_lv2_ccmap *ccmap);
|
||||
LV2_URID sfizz_lv2_ccmap_map(const sfizz_lv2_ccmap *ccmap, int cc);
|
||||
int sfizz_lv2_ccmap_unmap(const sfizz_lv2_ccmap *ccmap, LV2_URID urid);
|
||||
|
||||
struct sfizz_lv2_ccmap_delete {
|
||||
void operator()(sfizz_lv2_ccmap* ccmap) const noexcept { sfizz_lv2_ccmap_free(ccmap); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ struct sfizz_ui_t : EditorController, VSTGUIEditorInterface {
|
|||
LV2_URID sfizz_sfz_file_uri;
|
||||
LV2_URID sfizz_scala_file_uri;
|
||||
LV2_URID sfizz_osc_blob_uri;
|
||||
std::unique_ptr<sfizz_lv2_ccmap, sfizz_lv2_ccmap_delete> ccmap;
|
||||
|
||||
uint8_t osc_temp[OSC_TEMP_SIZE];
|
||||
alignas(LV2_Atom) uint8_t atom_temp[ATOM_TEMP_SIZE];
|
||||
|
|
@ -211,6 +212,7 @@ instantiate(const LV2UI_Descriptor *descriptor,
|
|||
self->sfizz_sfz_file_uri = map->map(map->handle, SFIZZ__sfzFile);
|
||||
self->sfizz_scala_file_uri = map->map(map->handle, SFIZZ__tuningfile);
|
||||
self->sfizz_osc_blob_uri = map->map(map->handle, SFIZZ__OSCBlob);
|
||||
self->ccmap.reset(sfizz_lv2_ccmap_create(map));
|
||||
|
||||
// set up the resource path
|
||||
// * on Linux, this is determined by going 2 folders back from the SO path
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue