Commit graph

1047 commits

Author SHA1 Message Date
Kree0
e851e41b6e Support ScreenCapture loopback 2024-11-17 13:06:51 +08:00
Jesper Nordenberg
582e93c41d
Added supports_input/output methods to DeviceTrait (#920)
Time to get list of WASAPI devices on my machine (5 devices in total) before change:
Input devices: 12 ms, output devices: 187 ms

After change:
Input devices: 1 ms, output devices: 1 ms
2024-11-03 15:09:27 +01:00
Antoine Beyeler
ca77d848ad
Make all error enums Clone (#924) 2024-11-03 03:05:13 +01:00
Alexandre Bique
f43d36e554
ALSA: better card enumeration (#916)
- better device name
- list physical devices
- inject most common virtual ones (default, pipewire, pulse, ...)
2024-10-11 14:04:25 +02:00
Nico Franke
02b454c02c
Fix callback being called after dropping the stream (#869)
* Fix callback being called after dropping the stream

* Use weak reference to stream in disconnect listener
2024-10-11 10:39:35 +02:00
Jesper Nordenberg
d7dee9af10
Fixed memory leak (#919)
Fixed memory leak for parameter ppClosestMatch in call to IAudioClient::IsFormatSupported
2024-10-11 10:37:04 +02:00
Michael Watson
fb9a53982a
Remove unused import (#911) 2024-10-11 10:33:00 +02:00
Alexandre Bique
eb3d44542c
JACK: bump to 0.13.0 and fix compliation (#915) 2024-09-25 21:13:56 +02:00
Will
6ecfec4ed0
Bump Jack to v0.12 (#910)
* Bump to version 0.12.

* Fix some cargo clippy lints.

* Partially revert temp_buffer_to_data to be closer to original.

* Suppress too many arguments lint.
2024-09-10 03:15:56 +02:00
Peter Whidden
cc8ba75543
fix typo (still -> install) (#904) 2024-08-07 21:38:22 +02:00
Georgy Frolov
0da7ae1d42
bump ringbuf version in examples (#897) 2024-07-14 17:20:39 +02:00
Jonas Wagner
0246442da2
ALSA: Don't panic when handling invalid stream timestamps. (#886) 2024-05-13 00:40:06 +02:00
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
Genkagaku.GPT
8f1a9464a2
fix: asio failed by timeinfo flags type (#880) 2024-05-05 03:09:53 +02:00
coolkiid
ef95a03070
chore: fix a clippy warning (#871) 2024-03-28 21:53:01 +01:00
ky-bean
2ec761d30b
Add traits to SampleFormat's #[derive(...)] invocation (#864)
Specifically, `PartialOrd`, `Ord`, & `Hash`.
2024-03-14 03:22:57 +01:00
LucasFA
437d47f762
ci: Update docker images for arm (#865)
See https://github.com/cross-rs/cross/wiki/Configuration#builddockerfile
for context regarding the $CROSS_BASE_IMAGE environment variable. Here, it
resolves to
ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:{{cross_version}}

Relies on docker caching instead of pre-building the image.

Cross made the change to the GHCR on https://github.com/cross-rs/cross/pull/609

Add newline at EOF for some files.
2024-03-14 03:22:36 +01:00
Ame
ac6cbb2ba5
bump asio-sys crate (#858) 2024-03-05 01:32:34 +01:00
Ame
7b21251afd
Prepare 0.15.3 release (#856) 2024-03-05 01:17:16 +01:00
Ame
4502781298
windows 0.52 -> 0.54 (#855) 2024-03-03 00:33:25 +01:00
Ame
f894781e7e
Fix clippy warnings (#851) 2024-03-01 22:49:53 +01:00
Fredrik Fornwall
f3de611186
Fix minor variable mixup (#854) 2024-03-01 17:25:05 +01:00
Fredrik Fornwall
52a0188c39
Update jni from 0.19 to 0.21 (#853) 2024-03-01 16:19:26 +01:00
Fredrik Fornwall
70d65b54bf
Update alsa from 0.8 to 0.9 (#852) 2024-03-01 16:18:59 +01:00
Ame
403ffb557a
update oboe to 0.6 (#849) 2024-02-28 14:45:31 +01:00
Anatol Ulrich
db04f57be4
migrate wasm example to trunk (#844)
## Description

This PR migrates the wasm example from an npm/webpack based approach to [trunk](https://trunkrs.dev/). Fixes #834.

Of note:
the `console_error_panic_hook` dependency was gated in `Cargo.toml` via `[target."cfg(debug_assertions)".dependencies]`. This is documented as nonfunctional and will throw a warning on build:
```
warning: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. 
This value is not supported for selecting dependencies and will not work as expected. 
To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
```

Since the actual usage of `console_error_panic_hook` is *also* gated in `lib.rs` behind `#[cfg(debug_assertions)]` it didn't make sense to have the cargo gate in place, hence I have removed it.

## Next steps

If this PR is merged, the [wiki page](https://github.com/RustAudio/cpal/wiki/Setting-up-a-new-CPAL-WASM-project) linked in the root README should be updated as well.
2024-02-25 01:49:53 +01:00
James Liu
bdbbf75d82
Remove parking_lot dependency (#846)
The standard library is using a similar implementation to parking_lot now. Other than APIs that are unstable, there shouldn't be that much of a reason to rely on parking_lot anymore. Parts of the cpal codebase already are using std locks. This PR removes the remaining parking_lot uses and replaces them with the standard library's.
2024-02-25 01:48:53 +01:00
est31
4eec3e3441
Remove asmjs-unknown-emscripten (#847) 2024-02-25 01:47:52 +01:00
Przemysław Węgrzyn
6c3d11b8f6
ALSA: don't ignore POLLERR (#731) 2024-02-22 05:09:56 +01:00
Jesper Nordenberg
adaa49de8b
ASIO audio mixing fixes (#832)
* Fixed ASIO output mixing

Fixed clippy errors

* Fixed buffer silence bug

* Removed byteorder dependency

* Removed SizedSample bound
2024-02-21 01:45:23 +01:00
Jesper Nordenberg
b87ec4b5a7
Improved detection of WASAPI device formats (#839) 2024-02-21 01:44:45 +01:00
Jesper Nordenberg
bc6bfa2532
Boost WASAPI IO thread priority (#838) 2024-02-21 01:43:01 +01:00
Ian Kettlewell
8d50e6af64
Fix crash on Web / Wasm when 'atomics' flag is enabled (#837) 2024-02-18 00:00:05 +01:00
Jesper Nordenberg
52c7a9d680
Cleaned up asio-sys (#831)
- Fixed clippy warnings
- Removed once_cell
2024-02-10 18:40:19 +01:00
Brandon Elam Barker
bbb58ab767
Clone for device (#830)
* Clone for Device and Alsa Device

* fix cloning around PCM

* add Clone for oboe Device

* add Clone for ASIO Device
2024-02-06 04:48:11 +01:00
Adam Gausmann
4706396ca3
Add non-panicking variant of with_sample_rate (#828) 2024-02-05 02:29:30 +01:00
François
49c1196999
Update actions (#825)
* update actions/checkout to v4

other checkout

* switch actions-rs/toolchain to dtolnay/rust-toolchain

* stop using actions-rs/cargo

* stop using actions-rs/clippy-check

* update mymindstorm/setup-emsdk and don't use an old version of emscripten

* update katyo/publish-crates
2024-01-30 02:16:10 +01:00
François
d1837745ac
directly return Option instead of WasmOption (#823) 2024-01-30 02:14:55 +01:00
François
5a96f6e7f0
disable ndk default features (#824) 2024-01-27 02:15:02 +01:00
François
802073d808
download android 30 as it's the one used by default with cargo apk (#822) 2024-01-24 21:49:17 +01:00
Brandon Elam Barker
7d8ee38f31
add Copy for SupportedStreamConfigRange (#821) 2024-01-21 18:45:38 +01:00
François
1847359cae
update ndk to 0.8 (#820) 2024-01-19 21:46:00 +01:00
James Liu
310160fbbf
Remove once_cell dependency (#800)
* Remove once_cell dependency.

* Add rust-version and set it to 1.70
2023-12-17 02:05:24 +01:00
Alphyr
76b04065cf
Update windows and alsa dependencies (#812) 2023-12-04 18:02:15 +01:00
Ali Somay
efa0c7af6b
Improve asio sys build script (#809)
* Make build script more robust

* Make build dependencies available regardless of target

* Fix error about the u32 i32 type mismatch

* Update readme

* Fix target_arch bug
2023-11-11 16:27:55 +01:00
Ali Somay
3a449538b7
Automate asio sys build (#804) 2023-10-17 12:13:30 +02:00
Ryan McGrath
f51589c552
Replace assert in WASAPI check with bubble'd error (#797)
Replace assert in WASAPI WAVEFORMTEX supported format check with bubbled error message.

For our use case, this stops a crash that pops up for some users who encounter this path and allows us to gracefully just not play audio and log a message elsewhere.
2023-09-01 01:57:39 +02:00
Hugo van der Merwe
f063271c23
Fix synth_tones frequency (#792)
Each *_wave() function calls advance_sample(). Having tick() also call it results in skipping every second sample.
2023-08-03 03:42:34 +02:00
Paul Hansen
17d2cc2084
Update windows-rs dependency (#791)
* Update `windows-rs` dependency

* Fix clippy warnings

* Update CHANGELOG.md
2023-07-25 11:35:54 +02:00
Dickless
d0ff4fe91f
Fix warnings in asio_sys (#779)
* Fixed warnings using deprecated Error::description

* Allowed dead_code
2023-07-20 21:53:45 +02:00