Commit Graph

628 Commits

Author SHA1 Message Date
est31 8f28048f61
Merge pull request #344 from Luni-4/cargo-publish
Update and fix Github Actions
2019-10-26 15:45:33 +02:00
Luni-4 129599e85f Update and fix Github Actions 2019-10-26 14:38:26 +02:00
est31 dca5a11476
Merge pull request #337 from Luni-4/github-actions
Add cargo-publish job
2019-10-26 13:56:21 +02:00
est31 80d892d50c
Merge pull request #343 from Luni-4/fix-windows-actions
Update Github Actions for Windows
2019-10-26 12:46:55 +02:00
Luni-4 2a62f42e04 Update Github Actions for Windows 2019-10-26 12:22:50 +02:00
est31 5fa5ae8cff
Merge pull request #340 from mitchmindtree/thiserror
Switch to dtolnay's `thiserror` for handling error boilerplate
2019-10-13 12:58:52 +02:00
mitchmindtree 7b08cb0dae Update examples for switch to `thiserror`
To compensate for the removal of `failure`'s application friendly
`failure::Error` trait, this `anyhow` crate has been added as a
dev-dependency for the examples, but is by no means a necessity for
other crates downstream of CPAL.
2019-10-13 12:36:49 +02:00
mitchmindtree d9d4a906c9 Switch to dtolnay's `thiserror` for handling error boilerplate
Currently CPAL only really uses `failure` for its `derive` capabilities
and the ability to easily generate implementations for `Display`. That
said there are a few issues with using the `failure` crate:

- `failure` does not provie a `std::error::Error` implementation without
  first converting error types into `failure::Error`.
- It leaks significantly into the public API and expects downstream
  users to also depend on `failure` and the non-std `Fail` trait for
  their own error handling.
- Solved problems such as downcasting of causal errors which have since
  been addressed in `std`.
- Provides application-friendly `Fail` trait and `failure::Error` type,
  not particularly useful to libraries like CPAL.

The [`thiserror` crate](https://github.com/dtolnay/thiserror) is better
targeted towards libraries, does not leak into the public API while
providing easy generation of `Display`, `From` and `std::error::Error`
implementations including proper handling of the newish
`std::error::Error::source` method.
2019-10-13 12:29:21 +02:00
Luni-4 40ded0212d Add cargo-publish job 2019-10-05 11:11:03 +02:00
est31 be54ffff09
Merge pull request #338 from Luni-4/fix-clippy-pr
Enable clippy-check for pull requests
2019-10-05 04:01:25 +02:00
Luni-4 dd091b3310 Enable clippy-check for pull requests 2019-10-04 19:05:34 +02:00
est31 3498336239
Merge pull request #336 from Luni-4/fix-clippy
Fix the clippy-action
2019-10-04 12:32:38 +02:00
Luni-4 4e47c7ea8d Disable the clippy-action for pull requests 2019-10-04 12:20:40 +02:00
Luni-4 8234df7f3d Fix clippy 2019-10-04 11:54:11 +02:00
est31 8f5496b0fd
Merge pull request #335 from Luni-4/github-actions
Add Github Actions
2019-10-03 23:02:18 +02:00
Luni-4 2cd1e0d633 Add Github Actions 2019-10-03 15:59:45 +02:00
est31 712d83fb09
Merge pull request #333 from hatchling13/bugfix
Added winapi feature "winbase" in windows dependencies
2019-10-02 14:30:22 +02:00
est31 5f8618a5cf
Merge pull request #334 from bennetthardwick/fix/readme-build-button
Fix README.md builds badge
2019-10-02 14:03:06 +02:00
Bennett Hardwick 63364fd460 Fix README.md builds badge 2019-10-02 21:54:25 +10:00
Hatchling 5169f53304 Added winapi feature "winbase" in windows dependencies
When using cpal as dependency in other project, it was found that cpal
won't build due to unresolved import of winapi::um::winbase. Added the
feature at line 24 in Cargo.toml.
2019-10-01 14:46:02 +09:00
Tatsuyuki Ishi 43450a6dec
Move errors into separate module (#332)
Move errors into separate module
2019-10-01 11:10:02 +09:00
Tatsuyuki Ishi 4863a00225
Uses ringbuffer in feedback example (#331)
Uses ringbuffer in feedback example
2019-10-01 11:09:49 +09:00
msiglreith edc365f708 Move error into separate module 2019-09-29 14:05:06 +02:00
Mitchell Hentges 1676bf20b6
Adds comment about latency-push unwrap() 2019-09-27 10:18:23 -07:00
Mitchell Hentges 624d1f8ce6
Uses ringbuffer in feedback example 2019-09-26 17:19:12 -07:00
est31 fabf432a1a
Merge pull request #328 from RustAudio/ishitatsuyuki-travis-cache
Travis: enable Cargo cache
2019-09-06 02:45:21 +02:00
Tatsuyuki Ishi ea2421ad36
Travis: enable Cargo cache 2019-09-05 18:19:58 +09:00
Tatsuyuki Ishi 95e9fe0f91
Merge pull request #327 from alexheretic/alsa-set-buffer-near
Alsa: Set buffer size near to 100ms
2019-08-31 21:34:55 +09:00
Alex Butler b1228fc3ff
Alsa: Set buffer size near to 100ms 2019-08-31 13:33:57 +01:00
est31 9e3a19c352
Merge pull request #323 from ishitatsuyuki/alsa-avail-update
Use snd_pcm_avail_update
2019-08-24 07:51:20 +02:00
Tatsuyuki Ishi a5783d14c5 Use snd_pcm_avail_update 2019-08-24 12:32:19 +09:00
est31 447ad5d727
Merge pull request #321 from RustAudio/wasapi-capture
Fix WASAPI capture logic
2019-08-14 00:42:08 +02:00
ishitatsuyuki e9043c605a Fix WASAPI capture logic
The buffer size handling differs from what render streams uses. Logic is based on https://github.com/microsoft/Windows-universal-samples/blob/master/Samples/WindowsAudioSession/cpp/WASAPICapture.cpp.
2019-08-12 10:56:14 +09:00
est31 a1c71b217c
Merge pull request #320 from RustAudio/add-license-1
Create LICENSE
2019-08-11 13:59:29 +02:00
Tatsuyuki Ishi a7df2bd262
Create LICENSE 2019-08-11 20:20:43 +09:00
mitchmindtree d3fdb2dd4b
Merge pull request #307 from derekdreery/relax_buffer_size
Remove the (arbitary) restriction on buffer size
2019-08-10 20:10:24 +02:00
est31 624ca7624f
Update mod.rs (#314)
Fixes #309
2019-08-10 16:42:47 +02:00
est31 6bf00f176a
Merge pull request #317 from est31/remove_uninit
Remove mem::uninitialized() from coreaudio and alsa backends
2019-08-10 15:55:28 +02:00
est31 14c1258a57 Remove uninitalized from coreaudio backend
uninitialized is being deprecated in favour of
MaybeUninit and friends.

In fact, using mem::zeroed() here is the
initialization method that apple docs recommend.

https://developer.apple.com/documentation/coreaudiotypes/audiostreambasicdescription
2019-08-10 15:40:34 +02:00
est31 268ea6cfbf Remove mem::uninitialized from alsa backend
uninitialized is being deprecated in favour of
MaybeUninit and friends.
2019-08-10 15:08:21 +02:00
Richard Dodd (dodj) 684aa6392a
Update mod.rs
Fixes #309
2019-08-04 11:49:15 +01:00
Richard Dodd 1c34dd682e Remove code rather than comment out 2019-07-27 16:41:19 +01:00
Richard Dodd b7d230150c Remove the (arbitary) restriction on buffer size 2019-07-24 20:43:20 +01:00
mitchmindtree a04d869eaa
Merge pull request #305 from ishitatsuyuki/patch-1
Disable Android CI target
2019-07-18 15:19:04 +02:00
mitchmindtree 68bccdb325
Merge pull request #304 from ishitatsuyuki/host-name
Add name to HostId
2019-07-18 15:17:31 +02:00
Tatsuyuki Ishi 474a775ce7
Disable Android CI target
The Android build has been broken for a while; we don't have cfg-gated code for Android anyway for now.
2019-07-18 10:27:31 +09:00
Tatsuyuki Ishi 984ff0fd30 Add name to HostId 2019-07-18 09:46:50 +09:00
mitchmindtree e4ea5e9d06
Merge pull request #300 from ishitatsuyuki/patch-1
Small tweak for ALSA underruns
2019-07-07 12:57:35 +02:00
Tatsuyuki Ishi 447300101d Small tweak for ALSA underruns
The hardcoded errno was replaced by a constant, and `snd_pcm_prepare` was replaced by `snd_pcm_recover` per best practice (the underlying implementation seems same for now, though).
2019-07-07 19:42:08 +09:00
mitchmindtree 0f393f48a5
Merge pull request #298 from mitchmindtree/publish
Update CPAL to version 0.10.0.
2019-07-05 20:29:42 +02:00