Forum


Notice to all users

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

Results 1 to 5 of 5
  1. #1
    Join Date
    April 2014
    Posts
    14

    Using two input devices at once in Teamspeak

    I have a use-case where a user in a channel must broadcast their mic, and their speaker output to users in the channel at the same time.

    EG: a user is broadcasting an audio file and is talking over it at the same time to all users in a channel.

    Now I think using two input devices at once in Teamspeak isn't possible, but can anyone think of any solutions to this issue? doesn't matter if it's hardware or software based.

    So far the only way I've been able to achieve this is run two individual Teamspeak clients;

    First client is using the mic as the input device
    Second client is using the output speaker as the input device

    I don't want to run two clients to solve this problem though. Surely there has to be some easy method or tool to mix an output audio device and an input audio device together.

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    You should be able to just mix both audio streams in your software and then use the result in a custom capture device.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    April 2014
    Posts
    14
    Quote Originally Posted by Schlumpi View Post
    You don't need to run two individual Teamspeak clients. Just open a second connection to the server in second tab from one client and configure different input devices for each connection. Right-click on a bookmark entry to open a connection in a second (third, fourth...) tab.
    I'm using the Teamspeak SDK, not the official client unfortunately, I need to code this functionality myself.

    Quote Originally Posted by Chris View Post
    You should be able to just mix both audio streams in your software and then use the result in a custom capture device.
    This feature sounds quite interesting but I don't fully understand it's use from the documentation. In my use-case I wanted voice and PC audio broadcasted the same time, in real-time; but I'm getting the impression that you must fill a buffer first and then play it back (not real-time?)

    Is it supposed to be something like this?

    1.We start with created a custom device;

    ts3client_registerCustomDevice("customWaveDeviceId ")

    2. I open the custom capture device I created earlier with;

    ts3client_openCaptureDevice(scHandlerID, "custom", "customWaveDeviceId")

    Now we have a while loop running

    3. We then tell Teamspeak to use the capture data from my microphone, and send it to the customWaveDeviceId;

    short* capturebuffer;
    ts3client_processCustomCaptureData("customWaveDevi ceId", capturebuffer, samples); //Where do I get the buffer from??

    4.We then tell Teamspeak to get the PC audio data from my Output Device (EG, realtek speakers), and send it to the customWaveDeviceId;

    short* playbackbuffer;
    void ts3client_acquireCustomPlaybackData("customWaveDev iceId", playbackbuffer, samples); //Where do I get the buffer from??

    I'm assuming I can obtain this buffer which contains my PC audio and my captured voice somehow, and then put it into those functions. Both are essentially combined and then sent to the teamspeak channel. Am I on the right track here?

  4. #4
    Join Date
    June 2002
    Location
    Netherlands
    Posts
    1,049
    The answer all depends on how much time/money you want to spend and how generic your solution has to be.

    The most generic I guess would be to do as you propose and use custom devices. This means however that you have to create your own sound i/o routines on every supported platform. To answer 3 & 4 : this means you have to use OS routines to open the desired sound device and in case of 3, every x milliseconds get the samples from the device and give them to teamspeak or in case of 4, every x ms, get data from teamspeak and move it to the device. I suggest using 10 ms.

    If you are on linux it is much easier to use alsa to create a virtual device that mixes two streams. There is software for that in windows too, and I believe some audio drivers can already do this. I am not that familiar with apple but I am confident you can do complex sound setups there too.

  5. #5
    Join Date
    April 2014
    Posts
    14
    Well of course this needs to be done as soon as possible, at the same time this is entirely new stuff for me so i'm learning as I go. This is also running on, and only on Windows 7 and its a Visual Studio 2013, C++ application.

    Can you give me example code or point in some direction to achieve this? I thought the Teamspeak Client Lib already had the capability of holding the audio samples from the devices it connects to, and I simply had to get the samples from the Client Lib and pass them to the (3. 4.) functions.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Win64 Teamspeak 3 client - input devices
    By nmarques in forum Bug Reports [EN/DE]
    Replies: 0
    Last Post: July 7th, 2015, 01:33 AM
  2. Replies: 0
    Last Post: September 30th, 2011, 10:46 PM
  3. Invalid playback/input devices?
    By Lodestone in forum Client Support
    Replies: 6
    Last Post: January 23rd, 2010, 08:00 PM

Posting Permissions

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