mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
1
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=====================================================================================//
|
||||
|
||||
#ifndef SND_DEV_XAUDIO_H
|
||||
#define SND_DEV_XAUDIO_H
|
||||
#pragma once
|
||||
#include "audio_pch.h"
|
||||
#include "inetmessage.h"
|
||||
#include "netmessages.h"
|
||||
|
||||
class IAudioDevice;
|
||||
IAudioDevice *Audio_CreateXAudioDevice( void );
|
||||
|
||||
#if defined ( _X360 )
|
||||
|
||||
class CClientInfo;
|
||||
void VOICE_AddPlayerToVoiceList( CClientInfo *pClient, bool bLocal );
|
||||
|
||||
class CXboxVoice
|
||||
{
|
||||
public:
|
||||
|
||||
static const DWORD MAX_VOICE_BUFFER_TIME = 200; // 200ms
|
||||
CXboxVoice( void );
|
||||
void VoiceInit( void );
|
||||
void VoiceShutdown( void );
|
||||
void AddPlayerToVoiceList( CClientInfo *pClient, bool bLocal );
|
||||
void RemovePlayerFromVoiceList( CClientInfo *pClient, bool bLocal );
|
||||
bool VoiceUpdateData( void );
|
||||
void GetVoiceData( CLC_VoiceData *pData );
|
||||
void VoiceSendData( INetChannel *pChannel );
|
||||
void VoiceResetLocalData( void );
|
||||
void PlayIncomingVoiceData( XUID xuid, const byte *pbData, DWORD pdwSize );
|
||||
void UpdateHUDVoiceStatus( void );
|
||||
void GetRemoteTalkers( int *pNumTalkers, XUID *pRemoteTalkers );
|
||||
void SetPlaybackPriority( XUID remoteTalker, DWORD dwUserIndex, XHV_PLAYBACK_PRIORITY playbackPriority );
|
||||
bool IsPlayerTalking( XUID uid, bool bLocal );
|
||||
bool IsHeadsetPresent( int id );
|
||||
void RemoveAllTalkers( CClientInfo *pLocal );
|
||||
|
||||
private:
|
||||
PIXHV2ENGINE m_pXHVEngine;
|
||||
|
||||
|
||||
// Local chat data
|
||||
static const WORD m_ChatBufferSize = XHV_VOICECHAT_MODE_PACKET_SIZE * XHV_MAX_VOICECHAT_PACKETS;
|
||||
BYTE m_ChatBuffer[ m_ChatBufferSize ];
|
||||
WORD m_wLocalDataSize;
|
||||
|
||||
// Last voice data sent
|
||||
DWORD m_dwLastVoiceSend;
|
||||
};
|
||||
|
||||
CXboxVoice *Audio_GetXVoice( void );
|
||||
IXAudio2 *Audio_GetXAudio2( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif // SND_DEV_XAUDIO_H
|
||||
Reference in New Issue
Block a user