Commit Graph

708 Commits

Author SHA1 Message Date
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
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 6cd7492f4c Add missing `Hash` constraint to `StreamId`
This existed prior to the introduction of the `Host` API, but was lost
in translation. This re-adds the bounds so that downstream code does not
suddenly break due to a lacking `Hash` implementation in the next
CPAL version.
2019-07-05 19:28:34 +02:00
mitchmindtree 5b6570e661 Add missing Cargo.toml entries to asio-sys 2019-07-05 19:20:30 +02:00
mitchmindtree 6245dd899c Add some missing re-exports from the platform module into the crate root 2019-07-05 19:20:30 +02:00
mitchmindtree 4cbbcbe316
Merge pull request #293 from EmbarkStudios/master
Bump dependencies
2019-07-05 19:17:07 +02:00
mitchmindtree 9095bbc00e
Merge pull request #292 from mitchmindtree/asio
Add ASIO Host for Windows (rebase and refactor of #221)
2019-07-05 19:02:12 +02:00
mitchmindtree 714dab7270 Refactor asio message to use a match expr. Fix some typos. 2019-07-05 13:19:42 +02:00
mitchmindtree 64dc6accf9 Rebase for the trait refactor in #295. 2019-07-05 06:03:33 +10:00
mitchmindtree b7d40d2993 Handle timed buffer switch and messaging callbacks in asio-sys
This adds an implementation of ASIO message handling in a manner that
matches that demonstrated in the SDK's `hostsample.cpp` file.

Also refactors the code to ensure that both `buffer_switch` and
`buffer_switch_time_info` callbacks are handled.
2019-07-05 05:51:32 +10:00
mitchmindtree cc5b0555c2 Refactor of asio-sys while reviewing for code correctness
Most of this is an attempt at improving readability and modularity of
the asio-sys crate while attempting to review it for correctness. Still
unsure why glitching is occasionally occuring on output, but recorded
input sounds perfectly clean.
2019-07-05 05:51:31 +10:00
mitchmindtree 91c5aa86b3 Fix Driver destructor behaviour in asio-sys 2019-07-05 05:51:31 +10:00
mitchmindtree 9182f00e20 Check that sample format is supported by ASIO when building streams 2019-07-05 05:51:31 +10:00
mitchmindtree c432f2b18d Update asio-sys to allow for having multiple handles to the same driver
ASIO has a limitation where it only supports loading a single audio
driver at a time. This fixes a common error where CPAL users would
request both the default input device and output device in separate
`load_driver` calls. Now, `load_driver` will return another handle to
the existing driver if the existing driver has the same name.
2019-07-05 05:51:31 +10:00
mitchmindtree 8b4ebeffff Address README suggestions by @ishitatsuyuki 2019-07-05 05:51:31 +10:00
mitchmindtree 7d0f9c7265 Remove unreachable_patterns gate onto relevant fns so all platforms benefit 2019-07-05 05:51:31 +10:00
mitchmindtree 86e3366063 Remove unnecessary num crate from asio-sys 2019-07-05 05:51:30 +10:00
mitchmindtree c2b7c7f648 Remove .DS_Store from asio-sys gitignore 2019-07-05 05:51:30 +10: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
mitchmindtree 76fab4f982 Update README for ASIO v2.3.3 2019-07-05 05:51:30 +10:00
mitchmindtree 191b90909a Make Driver type responsible for managing user callbacks 2019-07-05 05:51:30 +10:00