-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when opening default stream on iOS #701
Comments
If it is of any help, I tried separating the // let output = rodio::OutputStreamBuilder::open_default_stream().unwrap();
let b = rodio::OutputStreamBuilder::from_default_device().unwrap();
let output = b.open_stream().unwrap(); |
I took a quick look, StreamConfigNotSupported is only returned when the sample type is not supported by rodio, however all sample types that are common are. Its quite the list, see Line 320 in 70d01da
Can you debug print your variable b? |
I tried but it didn't implement debug 😅 but can make a fork and quickly try Thanks for having a look so promptly |
huuuu thats wierd it should. Its an edit your right! |
No worries! Yeah the config implements Debug but the builder doesn't and the field is private.. Anyway, made a fork and here is the debug: OutputStreamConfig {
channel_count: 2,
sample_rate: 48000,
buffer_size: Fixed(
0,
),
sample_format: F32,
} |
|
fixed that
Thats super useful! thanks for that discovery! |
this is wrong, |
So the question is is this our bug or upstream. I am leaning towards the second. The config is coming from cpal's: @EriKWDev could confirm this by dbg printing the config passed to the function: |
Can do it later but heading away at the moment. But yeah might be from cpal this is coming from |
I wonder why compiler complains about missing matches in src/stream.rs:440 since it looks like all existing cases are explicitly covered. I will add an assertion in |
good idea
I rather have it fixed in cpal to be honest. That may take a while, we could for now add the workaround in rodio we should document that with a comment linked to a cpal issue. |
@dvdsk We may add a ticket to cpal regarding this. BUt I suspect CPAl may not be able to determine buffer size in some cases, so the defaulting logic has to be somewhere anyway. |
Found it. |
Agreed but having that logic in cpal makes more sense since they have a Default bufferlenght right? Anyway we cant make the issue till we are sure, and I do not have the hardware required. @EriKWDev there is no rush but to solve this correctly we do need your help yet again :) |
I'm more than happy to help out, but won't be back at the mac until later this evening. What are the things you would need debugged? |
Could you check if cpal's beep example works? https://github.com/RustAudio/cpal/blob/master/examples/beep.rs If it does not then this is a cpal issue. And it would be great if you could then open it there (they might need your help making progress). If beep does work then.... I will be confused :) |
Hi!
I've compiled a project for iOS (aarch64-apple-ios) in release mode. It compiles and runs on macOS, and without rodio the app runs fine on both iPhone and iPad. (iOS 18.1.1 and iOS 17.6.1 respectively)
However, even if rodio compiles and links successfully for the iOS target, when I run I get
BuildStreamError(StreamConfigNotSupported)
I'm calling
and using the latest commit on HEAD of the git repo as the version (70d01da)
the project is compiled as a static library and included as a library to link with in Xcode. Initially Xcode complained that it couldn't find some symbols like
_AudioComponentFindNext
and_AudioUnitUninitialize
and some more, but it went away when I explicitly added theAudioToolbox.framework
as a linked library as well.I get the same error in debug mode as well, and also if I try on the simulator with aarch64-apple-ios-sim target
How may I assist in debugging this?
The text was updated successfully, but these errors were encountered: