Commit graph

201 commits

Author SHA1 Message Date
est31
8e616c3dd9 Update alsa and nix dependencies
Also fixes the build.
2021-10-31 23:37:27 +01:00
Rob Sherwood
a75de094de cpal's nix dependency to 0.21; resolve build issue
Building HEAD was broken with "two different versions of 'nix'".
This fixes it.

See https://github.com/RustAudio/cpal/issues/608
2021-10-28 03:27:53 -07:00
est31
683e992d52 Release 0.13.4 2021-08-08 22:23:16 +02:00
Rémi Lauzier
5afa12c5f7
Update dependency 2021-07-30 16:54:21 -04:00
Roope Salmi
833acbae61 Update to rust-jack 0.7 and simplify implementation
With rust-jack 0.7, the buffer_size callback is moved to
ProcessHandler. This reflects how it is actually called by jack:
it is called synchronously on the process thread, but it is allowed to
perform non-real-time-safe operations. In CPAL, this means that
it is fine to reallocate the temporary interlacing buffers when buffer
size changes.

This removes the need for buffer splitting on the output stream type,
and prevents panics when buffer size is made larger than initially on
the input stream type. (for some reason, buffer splitting was not
implemented for input previously)
2021-04-04 03:53:25 +03:00
João Capucho
52821d9c37
Fix alsa in some configs outputting bad audio
This was introduced in 6b91485 and could cause issues with some alsa
configurations like that of pipewire-alsa which caused the audio to be
become weirdly distorted
2021-03-19 22:04:32 +00:00
Marcel Märtens
2993afeb56 update dependencies 2021-03-11 16:51:18 +01:00
Max de Danschutter
eaf4018596 Bump ndk 0.2 -> 0.3
Bump ndk-glue 0.2 -> 0.3
2021-03-05 11:59:10 +01:00
Max de Danschutter
006c81ef32 Bump Android dependencies
oboe 0.3.0 -> obeo 0.4.0
Jni 0.17.0 -> 0.18.0
2021-01-29 16:57:20 +01:00
Michael Hills
2cccf99d50 Refactor coreaudio host and add iOS support + ios-feedback example 2021-01-02 02:04:13 +11:00
Alex Moon
e76e1de3a3 Switch from structopt to clap to reduce dependencies. 2020-12-22 09:25:36 -07:00
Alex Moon
269c60fde0 Add an Android example and enhance the other examples with CLI argument parsing. 2020-12-14 11:04:32 -07:00
Alex Moon
fb30d291ce Avoid calling alsa::PCM::new() multiple times.
Ensures that alsa::PCM::new() is called only once for a given Device so that we are
not rapidly opening and closing ALSA devices.
2020-11-18 10:22:41 -07:00
est31
a65e028412 Update alsa requirement to 0.4.3 and change io to io_bytes 2020-11-08 21:34:20 +01:00
est31
0e0cc39eb4 Release 0.13.1 2020-11-08 15:18:58 +01:00
est31
3ccbcb843c Update ringbuf dev-dependency 2020-11-08 15:02:55 +01:00
Marli Frost
d0696d4814 chore(deps): update parking_lot to 0.11 2020-11-08 10:08:33 +00:00
David Ackerman
d93d06f81e
Update oboe version 2020-11-01 14:09:51 +02:00
enfipy
bf766c1d5d
Update oboe to newest version. Fix support of input/output oboe streams 2020-10-29 19:32:11 +02:00
enfipy
0ff26d163d
Add apk build and alter CI 2020-10-27 21:14:42 +02:00
mitchmindtree
f8775b1e7b
Merge pull request #468 from endragor/android-support
Android support via Oboe
2020-10-27 12:26:33 +01:00
Ruslan Mustakov
4e9d27266c Android support via Oboe 2020-10-24 15:42:21 +07:00
Erik Natanael Gustafsson
2b31fe41af
JACK Host (#389)
Co-authored-by: Federico Dolce <psykopear@gmail.com>
2020-10-01 18:04:43 +09:00
est31
7a8f017b1d
Release 0.12.1 (#456) 2020-07-23 01:28:42 +02:00
est31
42ee11affc Depend on version 0.2 of asio-sys 2020-07-23 00:55:40 +02:00
est31
62ba9a96b0
Publish version 0.12.0 (#443) 2020-07-09 06:40:17 +02:00
est31
ae0fc33b17
lazy_static and num-traits are only used by windows (#442) 2020-07-09 06:08:22 +02:00
Damian Peckett
6f43fc2b60 Add a wasm-bindgen based generic Web Audio backend. 2020-05-06 13:44:00 +02:00
mitchmindtree
63db35ed97
Merge pull request #7 from JoshuaBatty/timestamp_coreaudio_fixes
Timestamp coreaudio fixes
2020-05-01 15:24:15 +02:00
JoshuaBatty
590d37b103 fixes compile errors for coreaudio timestamp work 2020-05-01 15:20:37 +02:00
mitchmindtree
cdf23c3c62 Add stream timestamp implementation to WASAPI backend
This was written on Linux and while the code type-checks, it has not yet
been tested.
2020-04-29 14:59:25 +02:00
Alex Moon
62d540d396 Switch from vendored alsa-sys to alsa crate 2020-04-03 16:56:51 -04:00
mitchmindtree
2bf905f3ec
Merge pull request #358 from jbeich/dragonfly
DragonFly support
2020-01-13 15:47:45 +01:00
Jan Beich
e77634941d Drop alsa-sys dependency on OpenBSD
Unlike other BSDs it never packaged ALSA and prefers everything to use sndio.
2020-01-07 16:15:48 +00:00
msiglreith
972cce0f8c asio: Re-add possibility to create stream individually 2019-12-31 15:46:10 +01:00
mitchmindtree
fe9054f626 Publish version 0.11.0
Please see the CHANGELOG diff below for an overview of changes included
in this release.

You can find the full code diff [here](https://github.com/RustAudio/cpal/compare/391b32f5b2704141506eb4fcb827b8de76e77d54...master).

Thanks to all who have contributed! CPAL has come a long way thanks to
the combined effort of many different people!
2019-12-11 13:28:44 +01: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
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
Mitchell Hentges
624d1f8ce6
Uses ringbuffer in feedback example 2019-09-26 17:19:12 -07:00
mitchmindtree
391b32f5b2 Update CPAL to version 0.10.0.
This is quite a significant update for CPAL, including a number of
breaking changes. Here is a list of the breaking changes along with
links to where you can find more information:

- A `Host` API has been introduced in #289 along with a follow-up
  refactor in #295. Please see the examples for a demonstration of how
  to update your code. The necessary changes should hopefully be
  minimal. If this has caused you any major difficulty please let us
  know in an issue!
- An ASIO host has been introduced in #292. This adds support for
  Steinberg's ASIO audio driver API on Windows. Please see the ASIO
  section of the README for more information on how to setup CPAL with
  ASIO support for your project.
- The user callback API has been overhauled to emit `StreamEvent`s
  rather than buffers in order to support handling stream errors. #288.
- Error handling in general was overhauled in #286. This meant taking
  advantage of the `failure` crate and adding support for
  backend-specific errors with custom messages. Many unnecessary
  `panic!`s have been removed, but a few remain that would indicate bugs
  in CPAL.

In general, checking out the updated examples will be the easiest way to
get a quick overview on how you can update your own code for these
changes.

The CHANGELOG.md has been updated to include these changes.
2019-07-05 19:37:17 +02:00
mitchmindtree
4cbbcbe316
Merge pull request #293 from EmbarkStudios/master
Bump dependencies
2019-07-05 19:17:07 +02:00
mitchmindtree
8f95042b8d Add asio cargo feature for optional ASIO support
ASIO introduces quite a few extra crates and requires a fairly
complicated setup process (see the readme), so this feature is disabled
by default.
2019-07-05 05:51:30 +10:00
Tom Gowan
49bc3ee367 remove release symbols 2019-07-05 05:51:28 +10:00
Tom Gowan
616974353b opt in and bug fix 2019-07-05 05:51:26 +10:00
Tom Gowan
b0b0484d4b endian conversion 2019-07-05 05:51:25 +10:00
Tom Gowan
91f2edb277 utils as mod 2019-07-05 05:51:24 +10:00
Tom Gowan
d430000d2c beep working 2019-07-05 05:51:22 +10:00
Tom Gowan
8d5cb951d8 asio_utils 2019-07-05 05:51:22 +10:00
DMSDeveloper
9a084347db removed itertools 2019-07-05 05:51:21 +10:00