You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain() -> Result<(),Box<dynError>>{let host = cpal::host_from_id(cpal::HostId::Asio)?;let device = host
.default_output_device().ok_or("No output device available")?;println!("Output device: {}", device.name()?);let def_output_cfg = device.default_output_config()?;println!("{:?}", def_output_cfg);let stream = device.build_output_stream(&def_output_cfg.into(),move |data:&mut[f32], _:&cpal::OutputCallbackInfo| {println!("{}", data.len());// react to stream events and read or write stream data here.},move |_err| {// react to errors here.},None,// None=blocking, Some(Duration)=timeout)?;
stream.play().unwrap();
std::thread::sleep(std::time::Duration::from_secs(1));Ok(())}
result in the following output:
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Open error: is JACK server running?
jack_deactivate called with a NULL client
jack_deactivate called with a NULL client
jack_client_close called with a NULL client
Output device: ASIO4ALL v2
SupportedStreamConfig { channels: 2, sample_rate: SampleRate(44100), buffer_size: Range { min: 64, max: 2048 }, sample_format: I32 }
Error: StreamConfigNotSupported
error: process didn't exit successfully: `target\debug\cpal_test.exe` (exit code: 1)
Two problems:
It's weird it tries to use JACK. JACK is indeed installed on my system, but I don't see why cpal would try to use both JACK and ASIO at the same time (starting the jack server makes the first errors about jack go away, but the error about StreamConfigNotSupported remains). In any case, nothing in my Asio4All config is jack-related.
It says the the stream config isn't supported, but I'm just using the default one, and the range seems to be OK. Asio4All works in other contexts (eg. I'm using it with Bitwig). I have nothing else using Asio4All in the meantime.
The text was updated successfully, but these errors were encountered:
YPares
changed the title
Using ASIO results in StreamConfigNotSupported
Using Asio4All results in StreamConfigNotSupported
May 10, 2024
The following code
result in the following output:
Two problems:
The text was updated successfully, but these errors were encountered: