Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Feature/multi hooks #282

Merged
merged 56 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
dfc69ea
added instance type for per-instance hook storage, libpdreceiver now …
danomatika Dec 11, 2019
285c80e
Merge branch 'master' into feature/multi-hooks
danomatika Dec 11, 2019
dfb78a0
fixed incorrect main hook pointer and instance memory array issue
danomatika Dec 12, 2019
09f9a50
per-instance print hooks
danomatika Dec 12, 2019
bbc725f
set default sys_printhook as it's needed before pd is inited
danomatika Dec 12, 2019
cae75da
Merge branch 'master' into feature/multi-hooks
danomatika Nov 28, 2021
83cbd3d
now use per-instance midi hooks, fixed libpdinstance_new memory issue
danomatika Nov 29, 2021
e963fed
Merge branch 'master' into feature/multi-hooks
danomatika Nov 29, 2021
e4a3a13
fixed libpdinstance_new memory issue again (somehow lost in prev comm…
danomatika Nov 29, 2021
7dc506b
slight internal name change
danomatika Nov 29, 2021
03f6fa0
update pure-data
danomatika Nov 29, 2021
57e359e
update pure data tag
danomatika Dec 10, 2021
3d918e6
refactor to store per-instance hooks in pd_instance itself, added abi…
danomatika Dec 12, 2021
c8b745b
adjust to pd_stuff->pd_impdata naming
danomatika Dec 12, 2021
f6974da
void params
danomatika Dec 12, 2021
26b3ada
bump header year
danomatika Dec 12, 2021
0eb478e
fixed get/set instance requring instance pointer, updated pdtest_thre…
danomatika Mar 28, 2022
a9243c3
Merge branch 'master' into feature/multi-hooks
danomatika Mar 28, 2022
6bed600
pdtest_thread style updates
danomatika Mar 29, 2022
d68d01d
Merge branch 'master' into feature/multi-hooks
danomatika Mar 29, 2022
b40fac3
small doc update:
danomatika Mar 29, 2022
d2c8f34
updated changelog
danomatika Mar 29, 2022
e8851f2
Merge branch 'master' into feature/multi-hooks
danomatika Mar 31, 2022
1002ab7
print util now multi instance
danomatika Apr 8, 2022
0e4ece6
queued layer now multi instance (inspired by Antoine Rousseau's alt i…
danomatika Apr 8, 2022
625dcc0
update print util attribution
danomatika Apr 8, 2022
51f7d24
replace internal function call with macro for accessing STUFF impdata…
danomatika Apr 8, 2022
666b405
prefer stack to heap for per-instance hooks storage
danomatika Apr 8, 2022
109839a
added pdtest_queued by Antoine Rousseau
danomatika Apr 8, 2022
c5c986d
update pdtest_thread with print concat
danomatika Apr 8, 2022
7d29b78
added t_libpd_freehook type, added libpd_set_instance() optional user…
danomatika Apr 8, 2022
ff9a3b9
cpp updated for queued changes
danomatika Apr 8, 2022
67f5190
updated cpp samples
danomatika Apr 8, 2022
7d15ce7
cpp PdBase doc updates
danomatika Apr 8, 2022
09055c8
only use STUFF in LIBPDSTUFF macro if PDINSTANCE is defined
danomatika Apr 19, 2022
cefd69b
small print util clarification
danomatika Apr 19, 2022
877d9f1
cpp: added multiple instance support to PdBase, fixed pd::List.toStri…
danomatika Apr 19, 2022
f9b3bb6
update cpp samples for pd::List.toString() without trailing space
danomatika Apr 19, 2022
02d3ef4
pdtest_multi cpp sample
danomatika Apr 19, 2022
05f2ba1
updated changelog
danomatika Apr 19, 2022
b2706be
Merge branch 'master' into feature/multi-hooks
danomatika Apr 19, 2022
67a934f
added C++ multi instance support into to readme, fix whitespace issue
danomatika Apr 19, 2022
9a48b13
Merge branch 'master' into feature/multi-hooks
danomatika Apr 23, 2022
342ff64
pdtest_queued required pthread on linux
danomatika Apr 24, 2022
97b2db3
Merge branch 'master' into feature/multi-hooks
danomatika Apr 26, 2022
f4e651e
Merge branch 'master' into feature/multi-hooks
danomatika Apr 26, 2022
f660124
updated changelog
danomatika Apr 26, 2022
a2fe4d2
s_stuff.h already included by z_hooks.h
danomatika Apr 26, 2022
f2b8411
Merge branch 'master' into feature/multi-hooks
danomatika Apr 26, 2022
b70c7a6
Multi-instance support for C# wrapper.
residuum Apr 28, 2022
fd7a049
Merge branch 'master' into feature/multi-hooks
danomatika Apr 30, 2022
ce10333
only check doublehook if floathook not set
danomatika May 9, 2022
e0703c9
Merge pull request #222 from residuum/csharp-multiinstance
danomatika May 9, 2022
a58c000
updated changelog
danomatika Jun 15, 2022
a0a9ee7
Merge branch 'master' into feature/multi-hooks
danomatika Nov 4, 2022
46b9c24
remove binary
danomatika Nov 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@
* fixed bad readme link to wiki
* removed defunct libpd.cc link for now

* C: print and midi hooks finally per-instance (!)
* C: added double precision support: libpd_read_array_double(),
libpd_write_array_double(), libpd_double(), libpd_add_double(),
libpd_set_double(), t_libpd_doublehook, libpd_set_doublehook(),
libpd_get_double() (IOhannes Zmoelnig)
* C: added libpd_set_instancedata() & libpd_get_instancedata() for optional
per-instance user data storage
* C: added t_libpd_freehook type
* C: fixed libpdinstance_new() memory issue
* C: fixed ringbuffer mem barrier on Windows (Ali Somay)
* C: call socket_init() during libpd_init() for Windows (reported by Ali Somay)

* C++: added pd::PdBase per-instance support
note: when compiled with PDINSTANCE defined, PdBase calls
libpd_set_instance() internally so existing projects which use the
libpd_*_instance() functions manually may need to be updated
* C++: fixed pd::List.toString() trailing whitespace

* C#: added per-instance support (Thomas Mayer)

* Cocoapods: fixed clone unauthenticated git protocol error by moving to https
submodule urls (reported by Ricardo de Amorim), run the following
after updating a repo:
Expand All @@ -27,6 +41,7 @@
* CMake: removed unnecessary BSymbolic flag on Windows (Jean-Michaël Celerier)

* various readme updates and clarifications
* added pdtest_double c sample

0.12.3 2021 Jun 12

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ $(PDJAVA_SRC): $(PDJAVA_JAR_FILES)

csharplib: $(PDCSHARP)

$(PDCSHARP): ${PD_FILES:.c=.o} ${EXTRA_FILES:.c=.o}
$(PDCSHARP): ${PD_FILES:.c=.o} ${LIBPD_UTILS:.c=.o} ${EXTRA_FILES:.c=.o}
$(CC) -o $(PDCSHARP) $^ $(CSHARP_LDFLAGS) -lm -lpthread

clean:
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ By building with the `FAT_LIB=true` Makefile option, libpd will be compiled with

To override autodetection, specify the `-arch` flags directly using the `FAT_ARCHS` Makefile option:

make FAT_LIB=true FAT_ARCHS="-arch i386 -arch x86_64"
make FAT_LIB=true FAT_ARCHS="-arch i386 -arch x86_64"

### Windows

Expand Down Expand Up @@ -228,6 +228,16 @@ The C++ wrapper is inspired by the Java wrapper and provides a PdBase class as w

Sample programs are found in `samples/cpp`.

### Multiple Instance Support

By default, PdBase always wraps to the single main libpd instance, so it is recommended to only use one instance of PdBase.

If `PDINSTANCE` is defined, each PdBase will wrap a separate libpd instance.

To enable multiple instance support:
* Build libpd with `make MULTI=true` or with CFLAGS `-DPDINSTANCE -DPDTHREADS`
* Build the C++ program using PdBase.hpp with CPPFLAGS `-DPDINSTANCE`

C\#
--

Expand Down
Loading