Giter VIP home page Giter VIP logo

Comments (18)

Maufeat avatar Maufeat commented on June 5, 2024 1

My first attempt at integrating it to bevy looked good, not working since I have a few plugin/dynamic libs that are not linked but apparently it works.

Bildschirmfoto 2023-01-04 um 03 23 53

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

I'd really like to, but I have no way to test on Mac and never used Wwise for deployment on MacOS either :/ it's a bit too "shot in the dark" for me!

from rrise.

superkittens avatar superkittens commented on June 5, 2024

So I'm working on getting this to build on mac. It's not too bad so far but I'm running into a bindgen error "failed to add native library libAKSoundEngine.a: file too small to be an archive"
Have you run into this before on the Windows/Linux end?

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

Hmmm I've never seen this error before; maybe try reinstalling the MacOS stack from Wwise launcher and try again? Maybe your version of the library is truncated or didn't copy properly? What is the size of this file compared to other platforms like Linux? It should be pretty big AFAIK.
Also just to make sure: are you on 2021.1.7?

from rrise.

superkittens avatar superkittens commented on June 5, 2024

I'm on 21.1.9 but I'm not sure if that would affect the build process (I was able to build another C++ project using this version). Quick check, the command to build rrise is RUSTFLAGS="cfg=wwrelease" cargo build --release right?

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

In my case on Windows, this is how I build: $env:RUSTFLAGS="--cfg wwrelease"; cargo build --release, I'm not sure about your RUSTFLAGS. Also, do you have this linking error when building without --release and wwrelease?

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

I can try cross-compiling to MacOS from WSL2 maybe. Could you push on your fork a branch with your experimental MacOS support for rrise so that I can dig deeper?

from rrise.

superkittens avatar superkittens commented on June 5, 2024

Yeah even without --release and wwrelease, I get the linker errors.
I pushed my changes which you can find here

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

Unfortunately I couldn't get it to cross-compile, sorry. I couldn't find a way to get the standard library for MacOS, only its SDK v.v
Let me know if/when you find anything, I'll be happy to merge.

from rrise.

superkittens avatar superkittens commented on June 5, 2024

Hey thanks for trying. I'll keep plugging away at this and see if I can make any progress

from rrise.

Maufeat avatar Maufeat commented on June 5, 2024

Hey, is there any progress? I just stumbled across this crate

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

Couldn't do anything from my side as I don't have any macs...

from rrise.

Maufeat avatar Maufeat commented on June 5, 2024

Mh, I tried to run it but I get 5 errors. No linker errors though.

/Applications/Audiokinetic/Wwise 2021.1.7.7796/SDK/samples/SoundEngine/POSIX/../Common/AkFileHelpersBase.h:90:28: error: expected expression

/Applications/Audiokinetic/Wwise 2021.1.7.7796/SDK/include/AK/SoundEngine/Common/IAkPlugin.h:1729:23: error: expected '('
Applications/Audiokinetic/Wwise 2021.1.7.7796/SDK/include/AK/SoundEngine/Common/IAkPlugin.h:1718:6: error: member initializer 'pNext' does not name a non-static data member or base class
/Applications/Audiokinetic/Wwise 2021.1.7.7796/SDK/include/AK/SoundEngine/Common/IAkPlugin.h:1729:59: error: expected ';' after expression

from rrise.

Maufeat avatar Maufeat commented on June 5, 2024

Now I get no error, but instead just get a libclang error: (printing flags at second line of snippet)

  cargo:rustc-link-lib=c++
  idx: 0x135f06a50, fname: 0x135f04790, c_args: ["-I/Applications/Audiokinetic/Wwise 2021.1.11.7933/SDK/include", "-x", "c++", "-std", "c++11", "-isysroot", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk", "-include", "c/ak.h", "c/utilities/default_streaming_mgr.h"], c_args.len(): 10, c_unsaved: 0x8, c_unsaved.len(): 0, opts: 1

  --- stderr
  thread 'main' panicked at 'libclang error; possible causes include:
  - Invalid flag syntax
  - Unrecognized flags
  - Invalid flag arguments
  - File I/O errors
  - Host vs. target architecture mismatch
  If you encounter an error missing from this list, please file an issue or a PR!', /Users/s.habermann/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.63.0/ir/context.rs:530:15
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/270c94e484e19764a2832ef918c95224eb3f17c7/library/std/src/panicking.rs:575:5
     1: core::panicking::panic_fmt
               at /rustc/270c94e484e19764a2832ef918c95224eb3f17c7/library/core/src/panicking.rs:64:14
     2: core::panicking::panic_display
               at /rustc/270c94e484e19764a2832ef918c95224eb3f17c7/library/core/src/panicking.rs:136:5
     3: core::panicking::panic_str
               at /rustc/270c94e484e19764a2832ef918c95224eb3f17c7/library/core/src/panicking.rs:120:5
     4: core::option::expect_failed
               at /rustc/270c94e484e19764a2832ef918c95224eb3f17c7/library/core/src/option.rs:1923:5
     5: core::option::Option<T>::expect
     6: bindgen::ir::context::BindgenContext::new
     7: bindgen::Bindings::generate
     8: bindgen::Builder::generate
     9: build_script_build::main
    10: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

I'd check the various causes given on stderr. Maybe one of the flags needs to be adapted from MSVC for clang. Did you try compiling with the code from this repository? Superkittens did some mods to the buildscript to support mac, but I don't know which issue they encountered.

from rrise.

Maufeat avatar Maufeat commented on June 5, 2024

Already looked into it, yeah. Didn't helped :/ I will read more into it.

from rrise.

Maufeat avatar Maufeat commented on June 5, 2024

Got it to compile. See #4

from rrise.

dtaralla avatar dtaralla commented on June 5, 2024

Very good work! It's already promising. Could you try running the supplied examples instead, to make sure I can assist you in your further questions? This way we're sure we'll be talking about the same things. You can also use the crate's tests to check if Rrise can build in common scenarios.

About the plugin errors, I think I see what's going on here. You are using dynamic loading for plugins like AkRoomVerb, and those are not installed in your toolchain. More info in the Wwise docs.

To circumvent this issue, you could try static-linking those plugins using Rrise's crate features. Just enable the corresponding features, and those warnings should go away (as well as the AK Error prints). If static-linking is not desirable, especially during development to benefit from shorter link times, you need to tell Wwise where to look for the dynamic libraries.

In a real application, you'd publish the libAkRoomVerb.bundle etc alongside your executable, so these errors wouldn't happen as the dynamic library could be found at runtime. But while developing, because you don't actually deploy the application, you need to add the %WWISE_SDK%/Mac/{profile}/lib/ย path to your dynamic library locations at runtime. Look how I do it for linux and windows in my examples (like looping_event.rs).

from rrise.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.