cpal icon indicating copy to clipboard operation
cpal copied to clipboard

feat(android): add `input_preset` to `StreamConfig`

Open TD-Sky opened this issue 4 months ago • 3 comments

Users can enable AEC (Acoustic Echo Canceler) via setting VOICE_COMMUNICATION for recording audio on Android (refer to here), which is a powerful and important feature for developing Android applications. However, I find no ways to enable this feature in cpal at present. So I add it here.

TD-Sky avatar Jul 31 '25 09:07 TD-Sky

Looking at the Github Actions results, it seems you left out some platform specific flags. Unfortunately, I can't edit your code, but it may be best to ensure this doesn't fail other systems.

Take a look at this:

MacOS: error[E0433]: failed to resolve: use of unresolved module or unlinked crate "ndk"

Would it be possible to go back and prevent other platforms from attempting to use this code, or fix the cross-platform issues?

wgibbs-rs avatar Jul 31 '25 19:07 wgibbs-rs

Looking at the Github Actions results, it seems you left out some platform specific flags. Unfortunately, I can't edit your code, but it may be best to ensure this doesn't fail other systems.

Take a look at this:

MacOS: error[E0433]: failed to resolve: use of unresolved module or unlinked crate "ndk"

Would it be possible to go back and prevent other platforms from attempting to use this code, or fix the cross-platform issues?

All fixed.

TD-Sky avatar Aug 01 '25 02:08 TD-Sky

This is a candidate for opt-in with #1010 together with the other audio input presets.

roderickvd avatar Sep 26 '25 20:09 roderickvd