Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes

It's unclear to me whether ak.wwise.ui.commands.execute is blocing or async. The doc doesn't address this.

Since there is the ak.wwise.ui.commands.executed API, I assumed that it's async. But ...

When I generate soundbanks using WAAPI: 

try:
    with WaapiClient() as client:
        def _on_soundbank_generated(*args, **kwargs):
            print('args: {}'.format(args))
            print('we should see this after bank dialog quits.')
            client.disconnect()
        handler = client.subscribe('ak.wwise.ui.commands.executed', _on_soundbank_generated, {"return": ['id', 'name', 'type']})
        query = {'command': 'GenerateAllSoundbanksAllPlatformsAutoClose'} 
        result = client.call('ak.wwise.ui.commands.execute', query)
        print('WAAPI query: {}, result{}'.format(query, result))
except Exception as err:
    raise RuntimeError('WAAPI query failed with error: {}. Aborted'.format(err))
, the bank generation dialog pops up and things are being generated. The API call blocks until the "Writing to disk" status appears in the dialog. 
This is weird. I expect that the call either returns right away or does not return until the bank generation dialog quits.
Am I missing something?

 
in General Discussion by Saul G. (290 points)

1 Answer

+1 vote
 
Best answer

ak.wwise.ui.commands.execute is generally a synchronous operation on the main thread of Wwise. It is blocking. 

However, there are know issues in the Soundbank Generation dialog that cause pending messages to be processed earlier. We will investigate.

We also have in our roadmap a task to support async execute in WAAPI. (WG-41753)

by Bernard R. (Audiokinetic) (35.8k points)
selected by Saul G.
...