Add parser test (usually ifdefed out)
This commit is contained in:
parent
fd14574c5f
commit
8b334e9b67
3
Makefile
3
Makefile
@ -13,6 +13,9 @@ drmr.so: drmr.c drmr_hydrogen.c
|
|||||||
drmr_ui.so: drmr_ui.c drmr_hydrogen.c
|
drmr_ui.so: drmr_ui.c drmr_hydrogen.c
|
||||||
$(CC) -shared -Wall -fPIC -DPIC drmr_ui.c drmr_hydrogen.c `pkg-config --cflags --libs lv2-plugin gtk+-2.0 sndfile samplerate` -lexpat -lm -o drmr_ui.so
|
$(CC) -shared -Wall -fPIC -DPIC drmr_ui.c drmr_hydrogen.c `pkg-config --cflags --libs lv2-plugin gtk+-2.0 sndfile samplerate` -lexpat -lm -o drmr_ui.so
|
||||||
|
|
||||||
|
htest: drmr_hydrogen.c
|
||||||
|
$(CC) -D_TEST_HYDROGEN_PARSER -Wall -fPIC -DPIC drmr_hydrogen.c `pkg-config --cflags --libs sndfile samplerate` -lexpat -lm -o htest
|
||||||
|
|
||||||
install: $(BUNDLE)
|
install: $(BUNDLE)
|
||||||
mkdir -p $(INSTALL_DIR)
|
mkdir -p $(INSTALL_DIR)
|
||||||
rm -rf $(INSTALL_DIR)/$(BUNDLE)
|
rm -rf $(INSTALL_DIR)/$(BUNDLE)
|
||||||
|
@ -571,3 +571,17 @@ drmr_sample* load_hydrogen_kit(char *path, double rate, int *num_samples) {
|
|||||||
*num_samples = num_inst;
|
*num_samples = num_inst;
|
||||||
return samples;
|
return samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _TEST_HYDROGEN_PARSER
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
kits *kits;
|
||||||
|
int i;
|
||||||
|
kits = scan_kits();
|
||||||
|
for (i=0;i<kits->num_kits;i++)
|
||||||
|
printf("\t%s:\n\t\tpath: %s\n\t\tsamples: %i\n",kits->kits[i].name,kits->kits[i].path,kits->kits[i].samples);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // _TEST_HYDROGEN_PARSER
|
||||||
|
Loading…
Reference in New Issue
Block a user