Skip to content
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

Build fails with error[E0282] on sample-0.10.0 method #194

Open
scroix opened this issue Aug 20, 2021 · 1 comment
Open

Build fails with error[E0282] on sample-0.10.0 method #194

scroix opened this issue Aug 20, 2021 · 1 comment

Comments

@scroix
Copy link
Member

scroix commented Aug 20, 2021

Just documenting my unsuccessful attempts to build from master since c8e3208 was merged, updating to nannou_0.13.

Builds are failing on the sample create (since deprecated) as reported on the nannou project. (Tested on Windows an macOS.)

A fix was merged around is available in nannou_audio_0.15 but bumping the dependency in this project is akin to falling down the rabbit hole. 😅

This is due to some major changes to the framework, notably the move from sample to dasp.

I had a go porting the effected code directly to dasp, essentially:

[dependencies]
nannou_audio = "0.16.0"
dasp = { version = "0.11.0", features = ["all"] }

And moving from nannou_audio::sample to dasp::rms, dasp::envelope etc.


Not bad 👍, but now on Windows we're no longer retrieving the ASIO host from nannou_audio.

error[E0277]: `std::sync::mpsc::Sender<cpal::host::wasapi::stream::Command>` cannot be shared between threads safely
   --> src/lib\soundscape\mod.rs:754:10

And on macOS, we're blocked while compiling coreaudio-sys, which appears to be an open issue.


Will document any progress -- perhaps a Linux system will still be viable 🤔

@scroix
Copy link
Member Author

scroix commented Aug 27, 2021

Reporting back on Linux attempt.

Switching from sample to the dasp crate didn't help unfortunately, the same error[E0277] on the same line. It wasn't ASIO specific after all?

This on Ubuntu 21.04 after adding the relevant packages.
sudo apt install build-essential libasound2-dev libx11-dev

...and disabling pulseaudio.
systemctl --user mask pulseaudio.socket
systemctl --user stop pulseaudio.service


error[E0277]: `*mut ()` cannot be shared between threads safely
   --> src/lib/soundscape/mod.rs:754:10
    |
754 |         .spawn(move || run(model, rx))
    |          ^^^^^ `*mut ()` cannot be shared between threads safely
    |
    = help: within `nannou_audio::stream::Shared<audio::input::Model>`, the trait `Sync` is not implemented for `*mut ()`
    = note: required because it appears within the type `PhantomData<*mut ()>`
    = note: required because it appears within the type `nannou_audio::cpal::platform::NotSendSyncAcrossAllPlatforms`
    = note: required because it appears within the type `nannou_audio::cpal::Stream`
    = note: required because it appears within the type `nannou_audio::stream::Shared<audio::input::Model>`
    = note: required because of the requirements on the impl of `Send` for `std::sync::Arc<nannou_audio::stream::Shared<audio::input::Model>>`
    = note: required because it appears within the type `nannou_audio::Stream<audio::input::Model>`
note: required because it appears within the type `soundscape::Model`
   --> src/lib/soundscape/mod.rs:125:12
    |
125 | pub struct Model {
    |            ^^^^^
    = note: required because it appears within the type `[closure@src/lib/soundscape/mod.rs:754:16: 754:38]`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant