Commit Graph

20 Commits

Author SHA1 Message Date
mitchmindtree aab0d90add Remove old `.rustfmt.toml` config. Run default `cargo fmt` on repo.
Seeing as a few large refactors have landed recently, I thought I'd take
this opportunity to do a `cargo fmt` run and standardise on the default
rustfmt settings.
2020-01-20 20:35:23 +01:00
mitchmindtree 05b62bb1c0 Remove `UnknownTypeBuffer` in favour of specifying sample type.
This is an implementation of the planned changes described in #119.

For a quick overview of how the API has changed, check out the updated
examples.

**TODO:**

- [x] Update API.
- [x] Update examples.
- [ ] Remove `data_type` field from `Format` (see [here](https://github.com/RustAudio/cpal/issues/119#issuecomment-573788380)).
- Update backends:
  - [x] null
  - [x] ALSA
  - [ ] ASIO
  - [ ] WASAPI
  - [ ] CoreAudio
  - [ ] Emscripten

Closes #119
Closes #260
2020-01-18 15:13:17 +01:00
tomaka d353c97c30 Add samples conversion functions and publish 0.5.1 (#170) 2017-10-21 09:45:02 +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 cdcef96279 Remove the `get_` prefix of methods (#151)
* Remove the `get_` prefix of methods

* Fix overlooks
2017-10-11 10:39:44 +02:00
Pierre Krieger 52052b6d07 Use the format passed as parameter in Voice::new 2015-09-01 14:26:25 +02:00
Pierre Krieger ca72d1d67e Remove the conversion system 2015-08-20 14:44:23 +02:00
Pierre Krieger d85f969caf Rustup and version bumps 2015-04-20 09:30:36 +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
Pierre Krieger 28bd368658 Update for rustc 2015-02-22 11:24:49 +01:00
Pierre Krieger 2bc50adf4d Update for rust-1.0 alpha 2015-01-09 21:25:51 +01:00
Pierre Krieger 420a0f0fd4 Update for rustc 2015-01-05 10:52:59 +01:00
tomaka 0f76134359 Merge pull request #8 from tomaka/clean-convert-samples
Cleanup and add tests for convert_samples_rate
2014-12-23 15:02:26 +01:00
Pierre Krieger 6f01c38a62 Implement f32 to i16 and f32 to u16 conversions 2014-12-22 16:35:10 +01:00
Pierre Krieger aa83f64443 Cleanup and add tests for convert_samples_rate 2014-12-22 16:31:37 +01:00
Pierre Krieger 094dbef0e4 Add some documentation 2014-12-17 09:13:58 +01:00
Pierre Krieger f096a3b3a9 Add fixes and tests for samples conversions 2014-12-17 09:08:13 +01:00
Pierre Krieger 9721004ad0 Use Cow for formats conversions to avoid an allocation and copy 2014-12-17 08:53:09 +01:00
Pierre Krieger f4ac8a5492 Implement all samples formats 2014-12-17 08:47:19 +01:00