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