PDA

View Full Version : Delphi tsrGetSpeakers missing


Mecorr
26-06-2004, 00:05
when trying to compile the sample project that came with TeamSpeak 2, I get the error that it can't find the method tsrGetSpeakers. I have two questions
1) This does return the list of people currently speaking, correct ?
2) Anyone know the params required for this method ?

Kabukiman
26-06-2004, 12:45
1.) It returns the ID's of all Users that are currently speaking
2.) int (__stdcall *tsrSpeakers)(int iSpeakerIDs[], int* iMaxSpeakersExpected)

Example:

int aID[64] = {0};
int records = 64;
tsrSpeakers(aID, &records);


After calling tsrSpeakers, records holds the number of current Speakers and aID holds the PlayerID's (aID[0]...aID[records-1]).

qbnut
26-06-2004, 22:43
//################################################## ############################
//#
//# Function tsrGetSpeakers( tsrPlayerIDs:Pinteger; PlayerRecords:Pinteger ):Integer;
//#
//# Description:
//# Get Currently Speaking Players in the Channel
//#
//# Input:
//# tsrPlayerIDs: A pointer to an array of Player IDs
//# PlayerRecords: pointer to a integer which specifies how many
//# TtsrPlayerInfo records tsrPlayerIDs can hold.
//#
//# Output:
//# Result: 0 = OK, else the error number
//#
//################################################## ############################
Type TtsrGetSpeakers = Function ( tsrPlayerIDs:Pointer; PlayerRecords:Pinteger ):Integer;
{$ifdef linux}cdecl;{$endif} {$ifdef mswindows}stdcall;{$endif}
var tsrGetSpeakers : TtsrGetSpeakers;
Const fn_tsrGetSpeakers='tsrGetSpeakers';


The fact the call is missing from the SDK was reported on Mantis a long, long time ago, but I think all of their efforts are concentrated on Teamspeak 3, so it never got looked at.

Mecorr
29-06-2004, 20:34
awesome, thank you for the info.

I was able to get it working now :}