Commit graph

166 commits

Author SHA1 Message Date
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
Spencer Russell
207fa26fd9 some minor tweaks and adds a couple convenience functions to file playback 2014-01-10 15:56:42 -05:00
Howard Mao
7d7fd71341 add a FileInput AudioNode type 2014-01-08 18:25:55 -05:00
Howard Mao
5afba7136b add libsndfile bindings 2014-01-06 11:24:53 -05:00
Spencer Russell
38c1499e6f adds supporting for stopping AudioNodes 2014-01-05 22:50:56 -05:00
Spencer Russell
0f43ff836a now SinOsc, AudioMixer, and ArrayPlayer report their active flag properly 2014-01-03 13:32:30 -08:00
Spencer Russell
72fef9e4e1 refactor so render functions return an active flag 2014-01-03 13:02:25 -08:00
Spencer Russell
292005e1cd pulls out portaudio-specific stuff into separate code file 2014-01-03 11:47:38 -08:00
Spencer Russell
97dc8025bf changes all references of PortAudio name to AudioIO 2014-01-03 07:41:00 -08:00
Spencer Russell
6516537985 adds test for SinOsc and updates README 2013-12-30 03:29:43 -08:00
Spencer Russell
39bae583ed adds tests and support for playing more array types 2013-12-30 01:00:04 -08:00
Spencer Russell
6c8b99407c minor tweaks and comments 2013-12-22 18:13:57 -05:00
Spencer Russell
5a2222ccea a little restructuring and starting to add some tests 2013-12-22 18:06:02 -05:00
Spencer Russell
3a29b40c97 now exporting nodes and can play SinOsc 2013-12-22 17:27:29 -05:00
Spencer Russell
7806ead4ec array playback seems to be working smoothly now 2013-12-22 17:16:53 -05:00
Spencer Russell
12760b4096 basic rendering node infrastructure mostly working 2013-12-22 16:45:16 -05:00
Spencer Russell
c2d771d952 Merge branch 'master' into render_tasks 2013-12-22 12:48:09 -05:00
Spencer Russell
24d1669fe9 some build tweaks to get OSX working. needs testing on Linux 2013-12-22 11:49:05 -05:00
Spencer Russell
c8eaa71b7b in-progress implementing render tasks 2013-12-21 20:39:47 -05:00
Spencer Russell
171b709708 basic audio callback synchronization is working 2013-12-21 18:59:27 -05:00
Spencer Russell
ae77cd2260 first pass at synchronizing threads, using RemoteRef and semaphore 2013-12-21 18:59:27 -05:00
Spencer Russell
af0a6cdf55 adds a bit about reloading the module after rebuilding 2013-12-13 02:40:20 -05:00
Spencer Russell
7e1bfc9426 adds info on init so people aren't frightened by the device scan errors 2013-12-13 02:21:10 -05:00
Spencer Russell
6c51dd5c37 some module reorganization 2013-12-13 02:17:21 -05:00
Spencer Russell
85c61e1bf6 apparently julia uses * for string concat. something about algebra... 2013-12-13 01:47:58 -05:00
Spencer Russell
f233463fa1 now finds the custom shim library 2013-12-13 01:07:45 -05:00
Spencer Russell
6127cac834 adds exports to module 2013-12-13 00:38:00 -05:00
Spencer Russell
a8f1e13068 fixes const declaration 2013-12-13 00:19:26 -05:00
Spencer Russell
6bb4b33d9e comments out the reference code we're using to start PortAudio.jl 2013-12-13 00:17:44 -05:00
Spencer Russell
af6dd508e2 renames portaudio.jl to PortAudio.jl to match julia convention 2013-12-13 00:10:28 -05:00
Spencer Russell
0d89ddb532 adds build, adds the play_sin ccalls to portaudio.jl for testing 2013-12-13 00:06:48 -05:00
Spencer Russell
030b4acd4a initial commit with some toy code 2013-12-11 20:18:36 -05:00