Skip to content
Permalink
Browse files

Change TT_MUXED_USERID to 0x1001 so 0x1000 can be reused for special …

…user IDs. 0x1000 is TT_USERID_MAX + 1
  • Loading branch information
bear101 committed Jan 12, 2020
1 parent f6cd113 commit 3818cfdb470a7b93c1af235a2a23c26397d439c8
@@ -43,7 +43,7 @@
public static final int TT_TRANSMITUSERS_USERID_INDEX = 0;
public static final int TT_TRANSMITUSERS_STREAMTYPE_INDEX = 1;
public static final int TT_LOCAL_USERID = 0;
public static final int TT_MUXED_USERID = 0x8000;
public static final int TT_MUXED_USERID = 0x1001;

public static final int DEFAULT_TCP_PORT = 10333;
public static final int DEFAULT_UDP_PORT = 10333;
@@ -50,7 +50,7 @@ using namespace std::placeholders;
#define UDP_SOCKET_SEND_BUF_SIZE 0x20000

#define LOCAL_USERID 0
#define MUX_USERID 0x8000
#define MUX_USERID 0x1001

#define SIMULATE_RX_PACKETLOSS 0
#define SIMULATE_TX_PACKETLOSS 0
@@ -31,6 +31,8 @@
#include <codec/OggOutput.h>
#include <codec/OpusEncoder.h>

#include <myace/MyACE.h>

#if defined(WIN32)
#include <ace/Init_ACE.h>
#include <assert.h>
@@ -498,17 +498,29 @@ extern "C" {
UINT32 uSampleIndex;
} AudioBlock;

/** @brief User ID used to identify recorded audio from sound input
* device, i.e. TT_InitSoundInputDevice(). This user ID is passed to
* TT_EnableAudioBlockEvent() in order to receive #AudioBlock of audio
* that is transmitted to the #TTInstance's channel. */
/**
* @brief User ID passed to TT_EnableAudioBlockEvent() in order to
* receive #AudioBlock directly from sound input device after joining
* a channel.
*
* When this user ID is passed then the #AudioBlock received will be
* prior to audio preprocessing (#AudioPreprocessor).
*
* Note, however, that #CLIENTEVENT_USER_AUDIOBLOCK will not be
* triggered until the #TTInstance is in a channel. This is because
* the sound input device is not started until it knows the
* #AudioCodec's sample rate, number of channels and transmit
* interval. */
#define TT_LOCAL_USERID 0

/** @brief User ID used to identify muxed audio that has been mixed
* into a single stream. This user ID is passed to
* TT_EnableAudioBlockEvent() in order to receive #AudioBlock of audio
* that is played in the #TTInstance's channel.*/
#define TT_MUXED_USERID 0x8000
/**
* @brief User ID used to identify muxed audio that has been mixed
* into a single stream.
*
* This user ID is passed to TT_EnableAudioBlockEvent() in order to
* receive #AudioBlock of audio that is played in the #TTInstance's
* channel. */
#define TT_MUXED_USERID 0x1001 /* TT_USERID_MAX + 1 */

/** @} */

0 comments on commit 3818cfd

Please sign in to comment.
You can’t perform that action at this time.