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.

+1 vote

Hello dear Forum,

EDIT: i already found the solution to my problem - i just thought i might leave the question for other people who might have the same problem!
SOLUTION: you need to register a gameobject and add it to the default listener before you can post an event for it: "ak.soundengine.registerGameObj" and "ak.soundengine.setDefaultListeners
"
(if my solution is faulty please let me know!)


original question:

i want to use the waapi to play sounds / post events which are called by Processing, but i just can't seem to do it.

for testing purposes i used the provided python sample script (before moving on to processing) from the waapi samples page, and the getInfo response worked just fine.

when i try to run the python script with the postEvent command (code below)

import sys
import os

import requests
import json
import codecs

payload = {
    'uri': "ak.soundengine.postEvent",
    'options': {},
    'args': {
    'event': "ConnectionTest",
    'gameObject': 1
    }
}

try:
    r = requests.post("http://localhost:8090/waapi", data=json.dumps(payload))
    print(r.status_code, r.reason)
    print(r.text.encode('utf8', 'replace'))
except:
    print("Unable to connect to Waapi: Is Wwise running and Wwise Authoring API enabled?")

i do get a correct response:  (200, 'OK') {"return":34}

BUT no sound is played in Wwise...i have no idea why not.

Can somebody give me a hint on what i am missing here? :)
thank you very much

closed with the note: Solution Found
in General Discussion by David Z. (150 points)
closed by David Z.
...