Add Opcode type to bridge, and pull the opcodes from the cgo side.

This commit is contained in:
Veikko Sariola
2020-10-22 23:29:37 +03:00
parent af75dd38aa
commit 896e7e70b1
2 changed files with 46 additions and 5 deletions

View File

@ -21,10 +21,8 @@ const su_max_samples = SAMPLES_PER_ROW * TOTAL_ROWS
// const bufsize = su_max_samples * 2
func TestBridge(t *testing.T) {
commands := [2048]byte{
2, 2, 11, 0, // envelope mono, envelope mono, out stereo, advance
// TODO: pull these somehow from the C-side
}
commands := [2048]bridge.Opcode{
bridge.Envelope, bridge.Envelope, bridge.Out.Stereo(), bridge.Advance}
values := [16384]byte{64, 64, 64, 80, 128, // envelope 1
95, 64, 64, 80, 128, // envelope 2
128}