Commit graph

28 commits

Author SHA1 Message Date
Philipp Schuster
8615160344
doc: improvements for SampleFormat (#885)
* doc: fix SampleFormat inconsistencies
* doc: add more documentation for SampleFormat
2024-05-12 17:28:53 +02:00
ky-bean
2ec761d30b
Add traits to SampleFormat's #[derive(...)] invocation (#864)
Specifically, `PartialOrd`, `Ord`, & `Hash`.
2024-03-14 03:22:57 +01:00
Caden Haustein
29999e6857
Remove stdweb in favor of js-sys, web-sys, and wasm-bindgen (#713) 2022-10-25 03:46:28 +02:00
Kai Giebeler
85d773d59f Migrate Sample to dasp_sample (#689) 2022-10-07 14:08:54 +02:00
Ram.Type-0
1b522fb3db
Faster sample format conversion (#618)
* Remove branch in `u16::to_i16` and `i16::to_u16`

If optimizations are at least at level 1, the conversions compile down to the same code as the old one, but if they are turned off, the new code is faster.

* Faster conversion from `f32` to `u16`

The new code is faster in release mode.
2022-01-14 12:23:30 +01:00
Rémi Lauzier
ba462dad18
Fix some typo and warnings 2021-06-29 11:30:26 -04:00
Rémi Lauzier
acd2476cd7
fix a rustc warning 2021-06-25 16:23:23 -04:00
Darakshan Farber
17e079d15d Eliminate or suppress Clippy messages. 2020-07-21 12:54:49 -07:00
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