Enable the importer in Puredata
This commit is contained in:
parent
f9cc84b5f0
commit
fdf25d6407
2 changed files with 3 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ add_pd_external(sfizz_puredata "sfizz_puredata.c")
|
||||||
target_compile_definitions(sfizz_puredata PRIVATE
|
target_compile_definitions(sfizz_puredata PRIVATE
|
||||||
"SFIZZ_NUM_CCS=${SFIZZ_NUM_CCS}"
|
"SFIZZ_NUM_CCS=${SFIZZ_NUM_CCS}"
|
||||||
"SFIZZ_VERSION=\"${CMAKE_PROJECT_VERSION}\"")
|
"SFIZZ_VERSION=\"${CMAKE_PROJECT_VERSION}\"")
|
||||||
target_link_libraries(sfizz_puredata PRIVATE sfizz::sfizz)
|
target_link_libraries(sfizz_puredata PRIVATE sfizz::import sfizz::sfizz)
|
||||||
|
|
||||||
set_target_properties(sfizz_puredata PROPERTIES
|
set_target_properties(sfizz_puredata PROPERTIES
|
||||||
OUTPUT_NAME "sfizz"
|
OUTPUT_NAME "sfizz"
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "GitBuildId.h"
|
#include "GitBuildId.h"
|
||||||
#include <m_pd.h>
|
#include <m_pd.h>
|
||||||
#include <sfizz.h>
|
#include <sfizz.h>
|
||||||
|
#include <sfizz/import/sfizz_import.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -62,7 +63,7 @@ static bool sfizz_tilde_do_load(t_sfizz_tilde* self)
|
||||||
{
|
{
|
||||||
bool loaded;
|
bool loaded;
|
||||||
if (self->filepath[0] != '\0')
|
if (self->filepath[0] != '\0')
|
||||||
loaded = sfizz_load_file(self->synth, self->filepath);
|
loaded = sfizz_load_or_import_file(self->synth, self->filepath, NULL);
|
||||||
else
|
else
|
||||||
loaded = sfizz_load_string(self->synth, "default.sfz", "<region>sample=*sine");
|
loaded = sfizz_load_string(self->synth, "default.sfz", "<region>sample=*sine");
|
||||||
return loaded;
|
return loaded;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue