Commit graph

181 commits

Author SHA1 Message Date
Spencer Russell
4fe967465c updates for SampledSignals 0.2.0 API 2016-09-04 13:05:42 -04:00
Spencer Russell
80af028efb swallows STDERR to remove some spurrious warnings from PortAudio and OSX 2016-08-16 19:19:35 -04:00
Spencer Russell
fcf87c0c61 now setting ringbuf size and prefill to twice blocksize 2016-08-16 18:26:38 -04:00
Spencer Russell
1d5ca112eb back to duplex-by-default but now with optional synchronization 2016-08-16 18:10:03 -04:00
Spencer Russell
7ea9da7e09 now always using a rational sample rate when using system default 2016-08-09 00:56:30 -04:00
Spencer Russell
e7cdbad4b3 now pulls samplerate from device by default. fixes #4 2016-08-08 23:34:54 -04:00
Spencer Russell
2cc49cc3e0 fixes error with multichannel reading 2016-08-08 21:28:34 -04:00
Spencer Russell
ede482ce6f defaults to output-only, bigger ringbuf, fixes issue with multichannel writing 2016-08-08 20:25:02 -04:00
Spencer Russell
0d64e4bd0c now will do partial ringbuf read/writes in partial underflow conditions. crashes on 0.5 --inline-no 2016-08-01 13:20:53 -04:00
Spencer Russell
fd425b3ace fixes bug when there's less than a full blocksize available in the ringbuffer 2016-07-31 01:42:47 -04:00
Spencer Russell
7cccb28d2b fixes another allocation when run with inlining off 2016-07-30 02:05:00 -04:00
Spencer Russell
829a09a2ae fixes munged case problem 2016-07-30 01:33:37 -04:00
Spencer Russell
30803bce97 renames bufsize to blocksize 2016-07-29 23:56:37 -04:00
Spencer Russell
77dcb8965c seems to be mostly working with lockfree ringbuffer 2016-07-29 01:44:02 -04:00
Spencer Russell
e40933b97b fixes 0.5 depwarns except AsyncCondition stuff 2016-07-28 00:55:56 -04:00
Spencer Russell
2bda1cf25e fixes missing newline in stream printing 2016-03-31 11:22:25 -04:00
Spencer Russell
43292ccaf8 updates for SampleTypes-to-SampledSignals rename 2016-03-31 11:07:46 -04:00
Spencer Russell
8a7a7d5baa moves most stream config to keyword args and updates README 2016-03-23 23:25:03 -04:00
Spencer Russell
096cfd49da adds pass-through read/write methods to PortAudioStream 2016-03-23 22:25:46 -04:00
Spencer Russell
8a3bebff2c removes a few pieces of cruft 2016-03-23 19:54:14 -04:00
Spencer Russell
ae923ba3a6 adds nicer show method for PortAudioStream 2016-03-23 19:49:30 -04:00
Spencer Russell
56cf15e9df removes extra asynccondition step now that our task isn't blocking 2016-03-23 19:37:42 -04:00
Spencer Russell
f868087e99 switches to using RingBuffer to better handle sub-buffer writes 2016-03-23 19:15:07 -04:00
Spencer Russell
333bbbf8d8 forwards InterruptException to waiters instead of killing audio task 2016-03-23 17:55:03 -04:00
Spencer Russell
5854270183 callback-based interface mostly working, but lots of dropouts 2016-03-23 13:10:14 -04:00
Spencer Russell
f02e733fe7 callback creation/scheduling seems to be working 2016-03-22 22:45:40 -04:00
Spencer Russell
bea06357b8 in-progress converting to callback API and supporting duplex streams 2016-03-22 02:03:43 -04:00
Spencer Russell
c3d8723b5b adds some tests and fixes, test coverage at 95% 2016-03-20 05:09:56 -04:00
Spencer Russell
ee4d05fcb2 reworks default source/sink loading so now we get the name 2016-03-20 03:52:02 -04:00
Spencer Russell
64a08bc90f adds better source/sink show method and more docs/examples to README 2016-03-20 03:23:28 -04:00
Spencer Russell
e51c980f24 adds ability to open device by name 2016-03-20 02:12:21 -04:00
Spencer Russell
738c4cff4b adds functionality to open a specific device instance 2016-03-20 02:07:39 -04:00
Spencer Russell
d419f51f68 refactores source/sink construction a bit 2016-03-20 01:20:59 -04:00
Spencer Russell
f834773b34 removes some unused dependencies and trying a new APT package name 2016-03-20 00:59:36 -04:00
Spencer Russell
d193a9c83d releases read/write busy flag on an exception 2016-03-20 00:53:08 -04:00
Spencer Russell
8ee46f5125 removes commented-out old code 2016-03-20 00:28:56 -04:00
Spencer Russell
559dca24c2 adds sink support 2016-03-20 00:25:30 -04:00
Spencer Russell
9b57992d83 adds queuing for writers 2016-03-19 23:59:19 -04:00
Spencer Russell
9bafaeaa45 refactored to remove background task and only write to PA during user writes 2016-03-19 23:50:15 -04:00
Spencer Russell
6830452b9c multichannel output working now 2016-03-19 22:45:00 -04:00
Spencer Russell
fae9b38224 massive restructuring. mono output to default sink works 2016-03-19 21:54:46 -04:00
Spencer Russell
80d329eb39 stripped out non-portaudio stuff and starting to reorganize portaudio stuff 2016-03-18 22:15:00 -04:00
Spencer Russell
c4dfef9178 more fixes to get the tests running without deprecations on 0.4 and 0.3 2015-11-12 09:51:12 -05:00
Bill
826fdafe5f Update portaudio.jl 2015-11-03 18:58:57 -10:00
Bill
348e2576f9 Update nodes.jl 2015-11-03 18:26:24 -10:00
Bill
3c663c675a Update AudioIO.jl 2015-11-03 17:38:05 -10:00
Bill
1ad2d5b27d Update sndfile.jl
compatibility 0.3 -> 0.4 changes
2015-11-03 13:49:36 -10:00
Bill
2c4b21940c Update sndfile.jl 2015-11-03 09:50:42 -10:00
Bill
e87ef290a2 Update nodes.jl
compatibility of union syntax from 0.3 to 0.4
2015-11-03 09:47:50 -10:00
Bill
6786c2b4bb Update AudioIO.jl
Add compatibility from 0.3 to 0.4
2015-11-03 09:46:02 -10:00
Bill
3f90e3c907 Update portaudio.jl
Add methods to use audio streams other than the default output stream
2015-11-01 22:55:55 -10:00
Bill
9c23d02066 Update portaudio.jl 2015-11-01 01:09:30 -10:00
Spencer Russell
87a160ba78 adds wrapper for Pa_GetVersionText 2014-11-21 23:16:12 -05:00
Gustavo Goretkin
a55b59d481 fix constant addition
due to
julia> s = 1.0 + SinOsc()
ERROR: `convert` has no method matching convert(::Type{AudioNode{T<:AudioRenderer}}, ::Float64)
 in OffsetRenderer at /Users/goretkin/.julia/v0.3/AudioIO/src/nodes.jl:178
 in + at /Users/goretkin/.julia/v0.3/AudioIO/src/operators.jl:16
2014-11-12 18:00:12 -05:00
Spencer Russell
9e02643482 allows under/over-flow warnings to be turned on and off 2014-08-29 10:42:11 -04:00
Spencer Russell
f75de3299f adds test and default channel for AudioInput 2014-08-28 17:05:15 -04:00
Spencer Russell
eaca8109f5 now using a pure-julia portaudio wrapper and the read/write API 2014-08-28 16:05:51 -04:00
Spencer Russell
f4adf31d15 finally gets rid of old crufty commented out code 2014-08-28 13:43:36 -04:00
Spencer Russell
cbcfedbad0 adds shim revision check so we know if it gets out of sync 2014-08-28 13:36:38 -04:00
Spencer Russell
ae76badebb adds method to get rate of a file 2014-08-27 10:58:17 -04:00
Spencer Russell
dd28b530ea adds try-finally to open so it's actually safe 2014-08-21 01:05:03 -04:00
Spencer Russell
2620e6ecb2 fixes issue and now passes test for stereo file playback (mixing to mono) 2014-08-13 12:31:56 -04:00
Spencer Russell
edf2f8fd04 now transposing the audio so columns are channels on a file read 2014-08-12 19:22:19 -04:00
Spencer Russell
c22b6b2347 merges in @bauglir's changes 2014-08-11 18:33:40 -04:00
Spencer Russell
89043b80c9 deprecates af_open in favor of AudioIO.open 2014-08-11 17:34:21 -04:00
Joris Kraak
26cf69ad94 Make audio file reads return data as n_frames x n_channels 2014-08-01 17:58:39 +02:00
Joris Kraak
b79b47a461 Add audio file seek capabilities 2014-08-01 14:06:14 +02:00
Joris Kraak
19c33d71c6 Remove unnecessary value check
Due to the way the `render` function was rewritten in eabf971, the audio
variable is always going to be an array of `AudioSample`s, so a check to
see if it is equal to `nothing` is no longer applicable.
2014-08-01 14:04:38 +02:00
Joris Kraak
0cd33b8289 Stop trying to read from audio file if no data is available
As soon as libsndfile has finished reading a file it no longer returns
any data. This can send the `render` method for `FileRenderer` into an
infinite loop. This way if not enough data is available a partial buffer
is returned.
2014-08-01 14:01:49 +02:00
Joris Kraak
289d7a56cd Support playing sound from stereo files 2014-08-01 14:00:24 +02:00
Elliot Saba
864f35db75 Fixes to work with BinDeps/Homebrew properly 2014-07-27 13:51:02 -04:00
Spencer Russell
450a9e9184 drops allocation by making the sample rate Float32 2014-07-01 02:32:02 -04:00
Calder Coalson
8c134edc26 Adjusted buffer length so buffer ends at the end of the ramp. 2014-06-28 16:33:34 -05:00
Calder Coalson
4eb15ae29f Added support for consecutive linear ramps. 2014-06-28 15:22:35 -05:00
Spencer Russell
7cfdff73ac removes buffer allocation in Offset render func 2014-06-27 12:22:30 -05:00
Spencer Russell
d5ae9237d6 adds ability to multiple AudioNodes. NEEDS TESTS 2014-06-27 00:31:10 -05:00
Spencer Russell
36c95f1a16 adds constant offset ability. No tests! 2014-06-26 16:01:06 -05:00
Spencer Russell
91aa390554 adds annotation to base render function 2014-06-26 15:36:52 -05:00
Spencer Russell
b07230919d simplifies AudioNode subtype declarations 2014-06-26 12:21:01 -05:00
Spencer Russell
eabf9717aa adds some new ways to read audiofiles 2014-06-26 09:12:53 -05:00
Spencer Russell
8cc51a435c drops allocation of MixRenderer to 64bytes 2014-06-25 23:16:07 -04:00
Spencer Russell
fab2f8ea8d render alloc on ArrayPlayer down to 192bytes. can probably do better 2014-06-25 22:51:25 -04:00
Spencer Russell
66654d3aaf dropped allocation on SinOsc{AudioNode} 2014-06-25 22:40:23 -04:00
Spencer Russell
e451509293 got LinRamp allocation down to 240bytes 2014-06-25 22:25:35 -04:00
Spencer Russell
6a065f0af2 eeked some more allocation out of SinOsc 2014-06-25 22:08:03 -04:00
Spencer Russell
7aafc697b0 SinOsc{Float32} allocation is way down 2014-06-25 21:51:16 -04:00
Spencer Russell
efd841d74d adds ability to control SinOsc freq from a signal 2014-06-24 03:30:38 -04:00
Spencer Russell
bf2e5bfb84 adds LinRamp node 2014-06-24 01:35:02 -04:00
Spencer Russell
a334a44a2e adds WhiteNoise AudioNode 2014-06-23 19:17:28 -04:00
Spencer Russell
9312fa745d ports AudioInput to new type structure 2014-06-23 18:48:01 -04:00
Spencer Russell
afe4e0d8be fixes imprecise SinOsc 2014-06-23 17:58:32 -04:00
Spencer Russell
f240f3fbf6 fixes issue where portaudio task was killing the root mixer 2014-06-23 17:38:50 -04:00
Spencer Russell
a1ed357629 refactored AudioNode to contain a AudioRenderer, tests passing 2014-06-23 02:10:35 -04:00
Spencer Russell
e48c6361fd adds Gain node with * operator 2014-05-23 20:59:22 -04:00
Spencer Russell
0d84cb409b removes flac test as it was broken on osx, adds get_audio_devices 2014-05-02 16:10:54 -04:00
Joris Kraak
7831578955 Add mono audio input to PortAudio shim
The way the PortAudio callback works it is possible to reuse the buffer
used for sharing output audio data between Julia and the C-library.

The output data can be pushed from the shared buffer to the PortAudio's
output buffer, after which the same location in the buffer can be used
for storing the data read from the input buffer.

This does assume equal lengths for the in- and output buffers.
2014-03-25 12:35:04 +01:00
Spencer Russell
0fa2977889 Merge pull request #8 from zhemao/master
Add basic support for file output
2014-01-23 09:06:03 -08:00
Spencer Russell
22dba358b8 adds ability to wait for an AudioNode 2014-01-13 19:19:56 -05:00
Howard Mao
255050b6c5 add a few more asserts 2014-01-11 11:37:12 -05:00
Howard Mao
d3ae48dd09 add basic support for file output 2014-01-11 11:23:58 -05:00