32 Commits

Author SHA1 Message Date
mitchmindtree
b47e46a4ac Update winapi version from 0.2 to 0.3 (#202)
Adds only the necessary cargo features to reduce compile time and reduce
the chance of linking errors occurring for unused libraries (e.g.
d3d12.dll fails to link on my win10 VM).

I thought I'd try and land this before before working on the wasapi
backend implementation for #201.

Tested both beep.rs and enumerate.rs and they work fine with the update.
2018-02-07 17:36:59 +01:00
mitchmindtree
fcc75f4566 Rename SamplesRate to SampleRate and ChannelsCount to ChannelCount (#199)
* Rename SamplesRate to SampleRate and samples_rate to sample_rate

* Rename ChannelsCount to ChannelCount

* Update CHANGELOG for SamplesRate and ChannelsCount renaming
2018-02-04 13:02:16 +01:00
mitchmindtree
f2728f6bdf Remove unused ChannelPosition API (update all backends and examples accordingly) (#198)
* Remove ChannelPosition API

This removes the ChannelPosition API from the lib root and updates the
ALSA backend and examples accordingly. The other backends have not yet
been updated.

Related discussion at #187.

* Update windows backend to removal of ChannelPosition API

The windows backend now assumes the channel position order is equal to
the channel position mask order. E.g. channel 0 will always be front
left, channel 1 will always be front right, etc.

Compiled and ran both examples successfully.

* Update coreaudio backend to removal of ChannelPosition API

Compiled and ran both examples successfully.

* Update emscriptem backend for removal of ChannelPosition API

* Update CHANGELOG for ChannelPosition removal
2018-02-04 10:38:06 +01:00
tomaka
91adc3e380 Docs and style improvements (#174)
* Improve the crate root documentation

* Add entry in CHANGELOG

* Run rustfmt on the code

* More improvements to documentation
2017-10-23 16:41:38 +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
4b019243c2 Rename the methods of the backend as well (#164) 2017-10-12 11:54:09 +02:00
tomaka
2028d5907f Run rustfmt on the code (#162) 2017-10-11 13:24:49 +02:00
thiolliere
e031025abe update to futures 0.1.1: alsa wasapi 2016-10-01 00:44:22 +02:00
Boris-Chengbiao Zhou
70858ad2e5 Fix #126 2016-08-19 21:48:53 +02:00
Pierre Krieger
bf051dd16f Add some documentation to the winapi implementation 2016-08-12 18:06:17 +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
Peter Atashian
fc4e3ce823 Update winapi
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-11-09 17:52:43 -05:00
Pierre Krieger
c93ffcff6c Add Voice::get_period() 2015-09-27 13:00:17 +02:00
Pierre Krieger
44e9dce43f Add Voice::get_pending_samples 2015-09-22 17:59:36 +02:00
Pierre Krieger
8d21f5ff25 Store the format in the public Voice struct 2015-09-22 13:34:06 +02:00
Pierre Krieger
d0e5e7f4e6 General WASAPI cleanup 2015-09-22 13:26:22 +02:00
Pierre Krieger
de0236b3b0 Fix the hack in the WASAPI implementation 2015-09-22 10:26:11 +02:00
tomaka
d3e610a614 Merge pull request #64 from tomaka/underflowed
Add an underflow() method to Voice
2015-09-22 10:02:41 +02:00
tomaka
826ad84db4 Merge pull request #66 from tomaka/inline
Add #[inline] attributes
2015-09-22 10:01:59 +02:00
Peter Atashian
61ac0528e7 Update winapi dependency
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-09-17 14:22:52 -04:00
Pierre Krieger
75f828b04f Add #[inline] attributes 2015-09-11 10:55:29 +02:00
Pierre Krieger
3dd7a8abe7 Add UnknownBufferType::len() 2015-09-10 21:24:41 +02:00
Pierre Krieger
c5e2cdd3c5 Add an underflow() method to Voice 2015-09-10 21:03:40 +02:00
Pierre Krieger
48282a068d Handle channels positionning 2015-09-10 11:44:19 +02:00
Pierre Krieger
078769dbbd Enable 32bits samples with WASAPI 2015-09-01 15:58:22 +02:00
Pierre Krieger
bf20431901 Handle F32 formats in Voice::new 2015-09-01 14:51:35 +02:00
Pierre Krieger
52052b6d07 Use the format passed as parameter in Voice::new 2015-09-01 14:26:25 +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