wavrecord and simultaneous play and record
Opened this issue · 7 comments
thanks @mgkuhn for refactoring the wavplay function awhile back. in that PR you mention the possibility of adding a wavrecord
function. how hard would that be for someone (like me) who is not familiar with apple's AudioToolbox?
i specifically need actually to play and record at the same time, making sure that the incoming and outgoing samples are in sync. is there a tutorial or example somewhere that demonstrates how to do this?
Kevin Avila, Chris Adamson: Learning Core Audio. Addison-Wesley, 2012.
I haven't done anything with the Core Audio API myself yet. In that wavplay PR, I just modernized existing Julia code that used it. (If one were to start adding recording or even a full-duplex audio interface to WAV, it would of course be nice to also cover the Win32 and PulseAudio interfaces eventually.)
I'd like to recommend portaudio.jl as a cross-platform abstraction for low-level audio APIs. It surely makes sense to avoid duplicating this effort.
i considered portaudio.jl, but it cannot do full-duplex as discussed in this to issue
PortAudio.jl can definitely do simultaneous playback+record, though I can see how that issue would cause confusion.
Older versions of PortAudio.jl had a specific synced
keyword that controlled how underruns and overruns were handled, and guaranteed that the input->output latency wouldn't change. That functionality was lost when we switched away from a callback approach.