Please only stick to the examples given in the Readme.md file. Single 
buffer IO is not working properly, yet. 
My current plan is to extend open() so you can pass a callback function 
which does the processing asynchronously. However, it does not seem to work 
when C code is called in an @async block... Have to investigate that 
further in the next days...

Am Sonntag, 21. Februar 2016 16:44:50 UTC+1 schrieb CrocoDuck O'Ducks:
>
> Hi there!
>
> I got into PortAudio.jl <https://github.com/seebk/PortAudio.jl> recently 
> (see this 
> <https://groups.google.com/forum/#!topic/julia-users/ooyT55TI-jk> 
> thread). I would like to code realtime digital filters. By that I mean that 
> I would like to acquire data from sound-card input(s) and, while the 
> acquisition goes on, filter the acquired samples and write the result to 
> the sound-card output(s). Latency does not need to be low. I have mostly 
> loudspeaker pre-hemphasis applications for acoustic measurements in mind 
> for that, that means I will time align what I need later on... I think the 
> PortAudio module should make me able to do that... but I have not figured 
> out how. Here what I have (very naively) tried:
>
> iostream = open(devID, (max_input_channels, max_output_channels), 
> sample_rate, buf_size)
>
> # Use a loop. Ctrl + C to exit the loop.
>
> doloop = true
>
> try
>   while doloop
>
>     ibuffer = read(iostream, buf_size) # Collect Input
>     obuffer = some_filtering_of(ibuffer) # Do some processing
>     write(iostream, obuffer) # Write it to output
>
>   end
> catch excp
>
>   if isa(excp, InterruptException) # Ctrl + C generates an 
> InterruptException
>     doloop = false
>   end
>
> end
>
> Of course, there are many problems with that (it is not collecting 
> consecutive buffers, for example). I guess it can help you understanding 
> what I have in mind though.
>

Reply via email to