Commit graph

558 commits

Author SHA1 Message Date
fufesou
e6c8d833ed fix: macos, screencapturekit, don't show cursor
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-12-18 21:02:01 +08:00
fufesou
dd8e6bfe16 Remove expect
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-11-23 09:00:18 +08:00
fufesou
8add08e51b Better selector check
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-11-22 23:38:22 +08:00
fufesou
f5b0c718de feat: macos, screencapturekit
1. Add new feature `screencapturekit`.
2. Remove `unwrap()` in mod `screencapturekit`.
No all `unwrap()` in this crate are removed.
3. Add selector check before calling it.

Signed-off-by: fufesou <linlong1266@gmail.com>
2024-11-22 21:09:54 +08:00
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
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
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
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
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
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
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
d1837745ac
directly return Option instead of WasmOption (#823) 2024-01-30 02:14:55 +01:00
Brandon Elam Barker
7d8ee38f31
add Copy for SupportedStreamConfigRange (#821) 2024-01-21 18:45:38 +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
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
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
Easyoakland
848abf256f
Added must use to stream. Fixes issue #589 (#772) 2023-04-04 04:36:28 +02:00
VincentJousse
61a2210d70
webaudio: set the channel_count in the AudioDestinationNode (#768)
Co-authored-by: Vincent Jousse <vincent.jousse@luminvent.com>
2023-03-30 16:05:42 +02:00
eladyn
17e7ab61fd
bump windows dependency to 0.46 (#765) 2023-03-26 17:40:47 +02:00
Dickless
6ed426614a
Fixed wasapi thread panics involving the main(or other) thread(when Stream drops). (#756)
when main(or other) thread(s) try to drop the Stream object, they would panic at host/wasapi/stream.rs Stream::drop() if the wasapi thread is dead. this occurs when the user wants to do something after all the cpal objects have been dropped.
2023-03-15 15:10:38 +01:00
François
29dd8e2852
switch from mach to mach2 (#760) 2023-03-14 12:30:52 +01:00
Adrien Prokopowicz
459499686e
Remove thiserror and replace it with hand written Error impls 2023-02-25 20:41:07 +01:00
Csányi István
72ad936b58 Fix CoTaskMemFree always getting called with null 2023-01-22 14:13:35 +01:00
Dimitris Apostolou
f123811209
Fix typos (#738) 2023-01-08 22:23:43 +01:00
Ruairidh Williamson
90471506b1
Support i32 for asio (#737) 2022-12-27 23:25:02 +01:00
Paul Hansen
7776c6634a
Update windows-rs dependency (#726) 2022-11-13 05:03:23 +01:00
Pedro Tacla Yamada
56f54cb0b3
Update to use coreaudio-sys 0.11 (#706) 2022-11-09 12:26:06 +01:00
alichay
7e17373e31
Add rustdoc links in most of the documentation (#682)
* Add rustdoc links in most of the documentation

Additionally, fix a couple of references to old
renamed types still lingering in the docs :)

Fixes #650

* Rustfmt on documentation changes

* Make docs for impl_platform_host not build example
2022-11-04 21:57:23 +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