Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 4 of 4
  1. #1
    Join Date
    May 2016

    3D Voice in Unity SDK not working

    I am setting TeamSpeakClient.SystemSet3DListenerAttributes for the current user and TeamSpeakClient.ChannelSet3DAttributes for multiple users as well as adjusting the distance and rollOffScale settings with TeamSpeakClient.SystemSet3DSettings, but nothing I change seems to spatialize the voice.

    I think the issue lies in the TeamSpeakInterface class passing the TS3_VECTOR objects to the dll.
    ts3client_systemset3DListenerAttributes for example uses the out keyword to pass the variable to the dll, I don't see how this can work. It should be using the ref keyword, but there are likely some other Marshalling issues as well, since I tried to just make that change.

    If you try to use a value passed to a function with the out keyword, it won't compile in C# (Use of unassigned out parameter Error). out is for returning data, ref is to pass a value by reference.

    Please let me know if I'm missing something, would love to get 3D voice working!

    Thank you for your time.

  2. #2
    Join Date
    May 2016
    Looks wrong to me, too.
    While there's a new C# wrapper in development, let's try to fix it right here as I don't have an ETA on that.

    Shot from the hip I'd change:
    	public struct TS3_VECTOR
            public float x;
            public float y;
            public float z;
    [DllImport(DLL_PATH, EntryPoint = "ts3client_systemset3DListenerAttributes")]
    public static extern uint ts3client_systemset3DListenerAttributes(uint64 scHandlerID, [param: MarshalAs(UnmanagedType.Struct), In] ref TS3_VECTOR position, [param: MarshalAs(UnmanagedType.Struct), In] ref TS3_VECTOR forward, [MarshalAs(UnmanagedType.Struct), In] ref TS3_VECTOR up);
    [DllImport(DLL_PATH, EntryPoint = "ts3client_channelset3DAttributes")]
    public static extern uint ts3client_channelset3DAttributes(uint64 scHandlerID, anyID clientID, [param: MarshalAs(UnmanagedType.Struct), In] ref TS3_VECTOR position);
    That said, it's untested and I haven't been working in C# for quite a while. I'll point our dev in charge for C# / Unity here, too.

  3. #3
    Join Date
    March 2017
    Forgive the necromancy here, but I've just run into the same issue. I've tried the hack suggested by thorwe, but it had no impact on the audio whatsoever; there's neither distance attenuation nor directionality to the sound.

    Any ideas, and/or updates on the "new C# wrapper" that was mentioned back in May?

  4. #4
    Join Date
    October 2016
    Did you find solution of this problem? If yes, please share it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unity Integration possible?
    By DonSlaughter in forum Linux
    Replies: 0
    Last Post: May 7th, 2016, 03:59 AM
  2. Voice Isn't working
    By DashedHopes in forum Windows
    Replies: 4
    Last Post: July 2nd, 2012, 06:21 AM
  3. unity 3d 3.3
    By moghazy in forum Client Support
    Replies: 0
    Last Post: July 11th, 2011, 08:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts