Hello everyone.
I am trying to use 3D positioining API on TS 3.0.10.1 I have 3d audio enabled and in according to documentation I do something like this:
Code:
void ts3plugin_onClientMoveEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* moveMessage) {
int errorCode;
TS3_VECTOR myPosition;
TS3_VECTOR hisPosition;
myPosition.x = 20.0f;
myPosition.z = 20.0f;
myPosition.y = 10.0f;
hisPosition.x = 30.0f;
hisPosition.y = 30.0f;
hisPosition.z = 30.0f;
if(clientID == myID)
{
errorCode = ts3Functions.systemset3DListenerAttributes(serverConnectionHandlerID, &myPosition, NULL, NULL);
if(errorCode != ERROR_ok)
{
printf("DEBUG: Failed to set own 3d position. Error code %d\n", errorCode);
}
else
{
printf("DEBUG: OWN 3D POSITION SET.\n");
}
}
else
{
errorCode = ts3Functions.channelset3DAttributes(serverConnectionHandlerID, clientID, &hisPosition);
if(errorCode != ERROR_ok)
{
printf("DEBUG: Failed to set remote clients 3d position. Error code %d\n", errorCode);
}
else
{
printf("DEBUG: REMOTE CLIENT 3D POSITION SET.\n");
}
}
}
Then I move me and other client to some channel - all calls to API return success (for my and client positions). But looks like API calls not affects 3D location - I can't hear any change in sound. Also, positions are not updated on "Setup 3D Sound" screen.
But I can hear difference in case of manual setting 3D positions "Setup 3D Sound" screen.
So, is API supposed to work this way? Or maybe I doing something wrong?
Thanks a lot.
PS
Windows 7 x64, tested on both 32 and 64 versions of TS 3.0.10.1
UPDATE:
If I close "Setup 3D Sound" screen (after pressing apply, without my plugin loaded) TS clears all 3D settings (user shown at same location and no 3D effect )....