It’s been a week of spring cleaning in the astrid world. Lots of
unremarkable cleanup, though I ended up getting bit by garbage-collected
cython strings when I realized that I was passing the instrument name to
astrid_instrument_start as pointer to a garbage-collected
string. Moving the instrument initiation into the main thread and
passing the wrapped cython Instrument to the message thread
let me simplify things a bit too, the python and C instruments both call
the same astrid_instrument_tick function in the main thread
now, which reads a line from the console, relays parsed commands as
messages on the instrument queues, and cleans up spent buffers in shared
memory.
Some remaining plumbing tasks that come to mind:
-
Use the same serialization routines for async renders in C routines. This is just because it’s waaaaaay easier to debug memory issues with gdb, valgrind and AddressSanitizer using a simple test C instrument that calls the same functions as the python instruments. I want to make sure I’m not leaving dangling resources in the new shared memory interfaces. (I fell asleep to the pulsar test program last night and woke up to kernel messages saying there were too many open files, so something is def not closing a reference somewhere.)
-
Test out sending serial messages via the trigger / sequencer callbacks. I’d really like to use this for rain and the serial messaging stuff isn’t exposed completely to python yet.
- Probably add a DC blocker to the ADC ringbuffer so I don’t have to worry about blowing things up when jack ports aren’t connected etc.
- Make sure the python instruments are actually getting samples back from the ADC now. Looks like it! But I just got it running silently at the coffeeshop this morning, so who knows.
Other stuff, I’m sure!