I tried to use multiprocessing to handle large number of queries on local Wwise project.
My code snippets below try to open 4 processes to query Wwise project concurrently:
import multiprocessing
taskname = 'asking wwise for soundbanks'
nprocs = 4
bnks = multiprocessing.Manager().dict()
bnks['bnks'] = []
ranges = organize_concurrency(ntasks, nprocs)
jobs = [multiprocessing.Process(target=worker, args=(bnks, tasks[rg[0]:rg[1]])) for rg in ranges]
for job in jobs:
job.start()
for j in jobs:
j.join()
The worker function does pretty straightforward ak.wwise.core.object.get queries so I'll skip it.
While some queries are OK, lots of others throw errors like:
ERROR:WaapiClientAutobahn:WaapiClientAutobahn (ERROR): ('ApplicationError(error=<ak.wwise.query.unknown_object>, args=[], '
"kwargs={'message': 'from id object is unknown', 'details': {'procedureUri': "
"'ak.wwise.core.object.get'}}, enc_algo=None, callee=None, "
'callee_authid=None, callee_authrole=None, forward_for=None)')
And the results of those queries are all null, although the objects are all present in the target project.
Does WAAPI support this kind of usage?