Commit Graph

9 Commits

Author SHA1 Message Date
Veikko Sariola
64afa9fb48 Change the C-API to roughly match the new Go-API.
The parameter order is now so that all the in/out int parameters are in the end of the signature.
2020-10-27 21:58:56 +02:00
Veikko Sariola
5f4b85b0a4 Change the Go API to have two versions: Render(buffer []float32), which always fill the whole buffer, and RenderTime(buffer []float32,int maxtime), which ends either when the buffer is full, or modulated time is reached. 2020-10-27 17:26:08 +02:00
Veikko Sariola
7a9ac3489b Add polyphonism support to bridge.go 2020-10-26 13:06:50 +02:00
Veikko Sariola
470ba28592 Change the Render function in bridge.go to return a tuple of: number of samples rendered; bool indicating if rowend was reached; and a possible error.
The callbacks are gone; the row looping is the job of the user which is probably better for everyone.
2020-10-26 08:30:43 +02:00
Veikko Sariola
6c90ba2067 Implement a song struct to hold all the information of a single song (corresponding one .asm file) and Render function for it. 2020-10-24 23:25:23 +03:00
Veikko Sariola
aa133b4606 Change bridge.go so that there is just SetPatch(...) function, instead of having to SetCommands, SetValues etc.
Now the patch definition in bridge_test.go and test_envelope.asm appear quite similar, so it's clear how they are related.
2020-10-24 16:15:15 +03:00
Veikko Sariola
1abc6f22d5 Change the Go bridge API to more idiomatic Go, offering a callback when the row advances. 2020-10-24 14:39:10 +03:00
Veikko Sariola
6e85ff674a Change the sointu.h api to return -1, 0 or n>0 depending if buffer is full and/or row ended.
test_render_samples_api.c was added to test the api. bridge.go was modified to reflect that there is no need to check for row manually; su_render_samples already returns the information if a row has ended.
2020-10-24 13:00:08 +03:00
Veikko Sariola
c9e8000c5f Remove the cmake magic to create bridge.go from bridge.go.in.
The bridge.go now just assumes that the library you want is built in the build/ directory. It's probably a lot better idea than using wherever the latest build was; this way the same build is always used for the library.
2020-10-23 00:04:54 +03:00