Commit Graph

46 Commits

Author SHA1 Message Date
jansol 393206bde9 examples: Avoid f32 precision loss in beep example (#167) 2017-10-20 17:12:01 +02:00
tomaka c28407b26d Fix warnings and reduce scope of libc (#166) 2017-10-19 12:44:14 +02:00
tomaka 6ae01f437c RFC: Rework the API [WIP] (#165)
* Rework the API to not use futures anymore

* Add some comments

* Update the MacOS backend

* Restore the null implementation

* Add an emscripten backend

* Remove erroneously added feature

* Fix to_f32 formula

* [WIP] Alsa backend

* Alsa backend compiling

* Working ALSA backend

* Fix tests

* Move WASAPI endpoint to endpoint module

* Fix WASAPI warnings

* Rework the WASAPI backend

* Check overflows for voice ID

* Add comments and minor fixes to WASAPI backend

* Add a changelog
2017-10-18 20:24:05 +02:00
tomaka 2028d5907f Run rustfmt on the code (#162) 2017-10-11 13:24:49 +02:00
tomaka cdcef96279 Remove the `get_` prefix of methods (#151)
* Remove the `get_` prefix of methods

* Fix overlooks
2017-10-11 10:39:44 +02:00
thiolliere f822631bc4 impl play and pause for ALSA
snd_pcm_pause could have been used but not all hardware implement it, so
I propose not to use it.

In this implementation:

there are two kind of scheduling: wait for resume signal and wait for
pcm to be available

if the stream is paused then it return notready and wait for resume

the event loop is different as it manages descriptors corresponding to
voices according to the nature of the scheduling.

there is still a FIXME: in voice.play the is signal is send even if
the event loop wasn't waiting for resume.
It doesn't seem to create any issue. But it happens when you write
voice.pause();voice.play();
2016-10-02 13:29:01 +02:00
thiolliere e031025abe update to futures 0.1.1: alsa wasapi 2016-10-01 00:44:22 +02:00
Pierre Krieger b1add0b12b Fix most warnings 2016-08-12 17:57:06 +02:00
Pierre Krieger be8310da51 Draft for switching to futures 2016-08-02 18:19:03 +02:00
tomaka ec0bd9ebbc Improve error reporting in beep example 2016-01-15 18:05:29 +01:00
Pierre Krieger 5fa41538a6 Various ALSA fixes 2015-09-22 15:46:56 +02:00
Pierre Krieger ec48453b6f Add endpoint::get_name() and an enumerate example 2015-09-22 14:46:27 +02:00
Pierre Krieger 8f11173256 Add an enumerate example 2015-09-22 14:43:30 +02:00
Pierre Krieger 9d56c4c616 Update the beep example 2015-09-10 12:00:52 +02:00
Pierre Krieger 98b931edff Add proper error handling 2015-09-01 14:17:57 +02:00
Pierre Krieger 1985c346ac Add supported formats enumeration 2015-09-01 13:53:54 +02:00
Pierre Krieger 47f966bf75 Correctly enumerate audio devices (core + wasapi) 2015-09-01 11:29:00 +02:00
Pierre Krieger ca72d1d67e Remove the conversion system 2015-08-20 14:44:23 +02:00
Pierre Krieger 2f36175d96 Fix samples signs on win32 2015-07-22 14:28:45 +02:00
Ruud van Asseldonk be84701f82 Simplify beep example 2015-04-27 17:33:02 +02:00
Pierre Krieger 07b2009dae Update for Rustc 1.0.0 beta 2015-04-04 09:22:23 +02:00
Pierre Krieger a6c1b14d66 Rustup 2015-03-26 10:03:40 +01:00
Pierre Krieger 84326cb4a7 Rustup 2015-03-25 13:50:52 +01:00
mitchmindtree 1d66e18d7e Fixed coreaudio callback to send proper buffersize, removed code in lib where sampleformat affected buffersize 2015-03-03 18:17:21 +11:00
mitchmindtree f212d85889 OSX support via the Apple Core Audio, Audio Unit C API. Only supports f32 so far. 2015-02-28 06:05:24 +11:00
Pierre Krieger 2e6143269a Update for rustc 2015-01-29 14:57:11 +01:00
Pierre Krieger 23e1e0639c Update for Rustc 2015-01-08 21:24:04 +01:00
Pierre Krieger 7adfdb4461 Update for changes in rustc 2014-12-30 08:35:13 +01:00
Pierre Krieger d947014084 Add play() and pause() functions 2014-12-23 15:25:25 +01:00
Pierre Krieger 04f9aac2c3 Rename `Channel` to `Voice` 2014-12-17 09:16:26 +01:00
Pierre Krieger 2d091726d7 Replace example by a smaller one 2014-12-17 06:59:03 +01:00
Pierre Krieger 49636365d8 Switch back to using buffers 2014-12-15 16:32:13 +01:00
Pierre Krieger 1a556514b0 Sound output now works correctly 2014-12-15 16:26:55 +01:00
Pierre Krieger 6becac9780 Change player architecture to avoid data losses 2014-12-15 15:40:38 +01:00
Pierre Krieger 04d07c27dc Modify API to use a "samples" iterator 2014-12-15 15:29:59 +01:00
Pierre Krieger 27c91645ad Add draft for example music playing 2014-12-15 13:01:37 +01:00
Pierre Krieger 081912c5fb Implement some samples rate conversions 2014-12-15 11:58:52 +01:00
Pierre Krieger 32bca93cc9 Implement some basic data conversion 2014-12-15 11:45:38 +01:00
Pierre Krieger b23857a57c Restore variable input format system 2014-12-15 10:29:29 +01:00
Pierre Krieger 99c23327d8 Add some formats-related functions 2014-12-11 19:07:58 +01:00
Pierre Krieger 0bdafdab9b Buffer now always has the u8 format 2014-12-11 19:02:04 +01:00
Pierre Krieger d6f49a5176 Rename example to "beep" 2014-12-11 18:10:03 +01:00
Pierre Krieger b98ac14bf4 Add some documentation 2014-12-11 18:09:48 +01:00
Pierre Krieger 03ccf4bfea Replace example by a sinusoid generator 2014-12-11 17:51:58 +01:00
Pierre Krieger 873779aaa8 Add basic API 2014-12-11 17:41:18 +01:00
Pierre Krieger 6b48a00758 Semi-working WASAPI example 2014-12-11 16:28:26 +01:00