Conversation
19070c2 to
1eca9ce
Compare
9e2ef9f to
fd59a29
Compare
|
Seems pipewire need edition 2024.. |
|
@roderickvd can you help review this pr? Thanks, and when can this crate be upgraded to edition 2024? I would also want to help |
Definitely will help you review it. Need a bit more time.
Actually cpal itself doesn't need to be upgraded to Rust 2024, it just needs a MSRV of Rust of 1.85 or higher to support dependencies that are Rust 2024 already. When we can I'd like to stick cpal to Rust 2021 so we keep our MSRV down. |
|
Super cool man! Happy to see cpal having better linux support, opening the possibility of loopback recording on Linux! |
07bc999 to
6cea2ad
Compare
|
ok, only one ci that I cannot fix |
a81e104 to
5a3817c
Compare
|
ok cross-rs based on ubuntu20.04, so |
721beb0 to
424d78f
Compare
|
How does this differ from #692? |
d6cd5b7 to
13f43f7
Compare
_typos.toml
Outdated
There was a problem hiding this comment.
Why is this file necessary? Can we remove it?
There was a problem hiding this comment.
ok. seems typos-lsp add it automately
There was a problem hiding this comment.
done. because the function of datas seems a typo for typos-lsp, and I accidentally invoke that action. Now I deleted it
src/host/pipewire/device.rs
Outdated
| Source, | ||
| } | ||
|
|
||
| #[allow(dead_code)] |
There was a problem hiding this comment.
This is the one I mean: please do not set it on the entire struct, but only on any fields that need it. Better yet consider if we cannot remove fields we don't use.
There was a problem hiding this comment.
I see, done
src/host/pipewire/device.rs
Outdated
| D: FnMut(&mut crate::Data, &crate::OutputCallbackInfo) + Send + 'static, | ||
| E: FnMut(crate::StreamError) + Send + 'static, | ||
| { | ||
| let (pw_play_tx, pw_play_rv) = pw::channel::channel::<StreamCommand>(); |
There was a problem hiding this comment.
Here are two _rvs that should be changed into _rx.
There was a problem hiding this comment.
because the time is named with "Receiver", so I think it should named as rv.. I see, I will change it, I misunderstood the x meaning
examples/record_wav.rs
Outdated
| ), | ||
| feature = "jack" | ||
| feature = "jack", | ||
| not(feature = "pipewire") |
There was a problem hiding this comment.
This breaks with --features jack,pipewire. Let's make sure it works all ways.
There was a problem hiding this comment.
I sync the way in beep.rs
src/host/pipewire/stream.rs
Outdated
| SampleFormat::F64 => Self::F64LE, | ||
| #[cfg(target_endian = "big")] | ||
| SampleFormat::F64 => Self::F64BE, | ||
| // TODO: maybe we also need to support others |
There was a problem hiding this comment.
Maybe specify that PipeWire does support U64 and I64, but libspa doesn't yet.
it is meaningful, but not used in this repo
997d50d to
769c8d7
Compare
no use to keep an unnecessary function
PipeWire does support U64 and I64, but libspa doesn't yet. so I add a todo and a note
make the flag pipewire, beep and pulseaudio enabled the same time
and cross --all-features also with pulseaudio
a08152e to
25d722b
Compare
it should not be here
and add some documents
Add support to pipewire
You can test it with pipewire feature open
Pipewire support use config to define rates. So the default config of cpal with pipewire can be changed through config like following.
Still problems left:*
once we do 'pipewire::init', we can only dequeue it after the whole thread. even put the function to another thread, the function still works.. But seems we can run init many times..(Ok, seems it is not a problem, because in when we call init, the init action will only be called once. I think it will be ok)*
The crates by pipewire need edition 2024. I think that should be another pr.