dtaralla / bevy-rrise

A Wwise Bevy integration
Other
11 stars 2 forks source link

"Init.bnk could not be loaded" #3

Closed targrub closed 1 year ago

targrub commented 1 year ago

I've generated two .bnk files, Init.bnk and glow1.bnk, in assets/soundbanks of my project, using Wwise 2021.1.10.7883. BANK_PATH is C:\Users\myname\rust\glow\assets\soundbanks. Neither of them are loading in my app (Bevy version="0.9", bevy-rrise version = "0.2.1", rrise version = "0.2"). Here's a log if I'm just trying to load Init.bnk:

2022-11-16T20:59:15.796911Z DEBUG init_sound_engine: bevy_rrise::plugin: Memory manager initialized
2022-11-16T20:59:15.797563Z DEBUG init_sound_engine: bevy_rrise::plugin: Default streaming manager initialized
2022-11-16T20:59:15.797707Z DEBUG init_sound_engine: bevy_rrise::plugin: Current language set
2022-11-16T20:59:15.798129Z DEBUG init_sound_engine: bevy_rrise::plugin: Internal sound engine initialized
2022-11-16T20:59:15.798258Z DEBUG init_sound_engine: bevy_rrise::plugin: Internal music engine initialized
2022-11-16T20:59:15.799553Z DEBUG init_sound_engine: bevy_rrise::plugin: Profiling (comms) initialized
2022-11-16T20:59:15.799972Z ERROR bevy_rrise::plugin: Init.bnk could not be loaded; there will be no audio. Make sure you generate all soundbanks before running
2022-11-16T20:59:15.800101Z ERROR bevy_rrise::plugin: Unexpected Wwise error: "the operation failed"
Couldn't load SoundBank: "the operation failed"
2022-11-16T20:59:30.622541Z ERROR init_new_rr_objects: bevy_rrise::emitter_listener: Couldn't post 'CM00Play0' on Some(9v0) - "the operation failed"
2022-11-16T20:59:30.622755Z DEBUG init_new_rr_objects: bevy_rrise::emitter_listener: Emitter 9 now registered
2022-11-16T20:59:30.622956Z ERROR init_new_rr_objects: bevy_rrise::emitter_listener: Couldn't post 'CM00Play1' on Some(10v0) - "the operation failed"
2022-11-16T20:59:30.623106Z DEBUG init_new_rr_objects: bevy_rrise::emitter_listener: Emitter 10 now registered
2022-11-16T20:59:30.623283Z ERROR init_new_rr_objects: bevy_rrise::emitter_listener: Couldn't post 'CM00Play2' on Some(11v0) - "the operation failed"
2022-11-16T20:59:30.623423Z DEBUG init_new_rr_objects: bevy_rrise::emitter_listener: Emitter 11 now registered
2022-11-16T20:59:30.623579Z ERROR init_new_rr_objects: bevy_rrise::emitter_listener: Couldn't post 'CM00Play3' on Some(12v0) - "the operation failed"
2022-11-16T20:59:30.623703Z DEBUG init_new_rr_objects: bevy_rrise::emitter_listener: Emitter 12 now registered
2022-11-16T20:59:30.624410Z DEBUG despawn_silent_emitters: bevy_rrise::emitter_listener: Despawned emitter 9 because it became silent
2022-11-16T20:59:30.624549Z DEBUG despawn_silent_emitters: bevy_rrise::emitter_listener: Despawned emitter 10 because it became silent
2022-11-16T20:59:30.624691Z DEBUG despawn_silent_emitters: bevy_rrise::emitter_listener: Despawned emitter 11 because it became silent
2022-11-16T20:59:30.624825Z DEBUG despawn_silent_emitters: bevy_rrise::emitter_listener: Despawned emitter 12 because it became silent
2022-11-16T20:59:36.060454Z DEBUG term_sound_engine: bevy_rrise::plugin: All objects stopped and unregistered
2022-11-16T20:59:36.060769Z DEBUG term_sound_engine: bevy_rrise::plugin: Profiling (comms) terminated
2022-11-16T20:59:36.060913Z DEBUG term_sound_engine: bevy_rrise::plugin: Internal music engine terminated
2022-11-16T20:59:36.064336Z DEBUG term_sound_engine: bevy_rrise::plugin: Internal sound engine terminated
2022-11-16T20:59:36.064679Z DEBUG term_sound_engine: bevy_rrise::plugin: Streaming manager terminated
2022-11-16T20:59:36.065201Z DEBUG term_sound_engine: bevy_rrise::plugin: Memory manager terminated

Init.bnk is 833 bytes on disk. The Init.txt that's generated looks like this:

Game Parameter  ID  Name            Wwise Object Path   Notes
    504532776   Brick           \Factory Acoustic Textures\Textures\Brick   
    513139656   Mountain            \Factory Acoustic Textures\Textures\Mountain    
    841620460   Concrete            \Factory Acoustic Textures\Textures\Concrete    
    1755085759  Wood_Deep           \Factory Acoustic Textures\Textures\Wood_Deep   
    1873957695  Anechoic            \Factory Acoustic Textures\Textures\Anechoic    
    1970351858  Fabric          \Factory Acoustic Textures\Textures\Fabric  
    2058049674  Wood            \Factory Acoustic Textures\Textures\Wood    
    2412606308  Carpet          \Factory Acoustic Textures\Textures\Carpet  
    2637588553  Tile            \Factory Acoustic Textures\Textures\Tile    
    2928161104  Curtains            \Factory Acoustic Textures\Textures\Curtains    
    3195498748  Cork_Tiles          \Factory Acoustic Textures\Textures\Cork_Tiles  
    3670307564  Drywall         \Factory Acoustic Textures\Textures\Drywall 
    4168643977  Acoustic_Banner         \Factory Acoustic Textures\Textures\Acoustic_Banner 
    4262522749  Wood_Bright         \Factory Acoustic Textures\Textures\Wood_Bright 

Audio Bus   ID  Name            Wwise Object Path   Notes
    3803692087  Master Audio Bus            \Default Work Unit\Master Audio Bus 

Audio Devices   ID  Name    Type                Notes
    2317455096  No_Output   No Output           
    3859886410  System  System          

and Init.xml is:

<?xml version="1.0" encoding="utf-8"?>
<SoundBanksInfo Platform="Windows" BasePlatform="Windows" SchemaVersion="12" SoundbankVersion="140">
    <RootPaths>
        <ProjectRoot>C:\Users\myname\Documents\WwiseProjects\glow\</ProjectRoot>
        <SourceFilesRoot>C:\Users\myname\Documents\WwiseProjects\glow\.cache\Windows\</SourceFilesRoot>
        <SoundBanksRoot>C:\Users\myname\rust\glow\assets\soundbanks\</SoundBanksRoot>
        <ExternalSourcesInputFile></ExternalSourcesInputFile>
        <ExternalSourcesOutputRoot>C:\Users\myname\Documents\WwiseProjects\glow\GeneratedSoundBanks\Windows</ExternalSourcesOutputRoot>
    </RootPaths>
    <SoundBanks>
        <SoundBank Id="1355168291" Language="SFX" Hash="837375629">
            <ObjectPath>Init</ObjectPath>
            <ShortName>Init</ShortName>
            <Path>Init.bnk</Path>
        </SoundBank>
    </SoundBanks>
</SoundBanksInfo>
active toolchain
----------------

nightly-x86_64-pc-windows-msvc (overridden by 'C:\Users\myname\rust\glow\rust-toolchain.toml')
rustc 1.67.0-nightly (a00f8ba7f 2022-11-15)
dtaralla commented 1 year ago

Thank you for the details on your config, it helped!

I think your bank files might not be discovered by the plugin. In your assets/soundbanks folder, do you have a subfolder for the platform you are running on? image

I've committed a change on main that adds a log when executed at bevy_rrise=debug level showing where the plugin expects the soundbank files to be. This could help diagnose!

Let me know what you find out.

targrub commented 1 year ago

I wasn't creating them to a platform-specific directory. Thanks for adding more logging!