Initial patch for in-game VoIP support!
This commit is contained in:
parent
0ee3960225
commit
12326a9eac
19 changed files with 1185 additions and 127 deletions
|
@ -62,6 +62,14 @@ static qboolean S_ValidSoundInterface( soundInterface_t *si )
|
|||
if( !si->SoundInfo ) return qfalse;
|
||||
if( !si->SoundList ) return qfalse;
|
||||
|
||||
#if USE_VOIP
|
||||
if( !si->StartCapture ) return qfalse;
|
||||
if( !si->AvailableCaptureSamples ) return qfalse;
|
||||
if( !si->Capture ) return qfalse;
|
||||
if( !si->StopCapture ) return qfalse;
|
||||
if( !si->MasterGain ) return qfalse;
|
||||
#endif
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
@ -118,11 +126,11 @@ void S_StopBackgroundTrack( void )
|
|||
S_RawSamples
|
||||
=================
|
||||
*/
|
||||
void S_RawSamples (int samples, int rate, int width, int channels,
|
||||
void S_RawSamples (int stream, int samples, int rate, int width, int channels,
|
||||
const byte *data, float volume)
|
||||
{
|
||||
if( si.RawSamples ) {
|
||||
si.RawSamples( samples, rate, width, channels, data, volume );
|
||||
si.RawSamples( stream, samples, rate, width, channels, data, volume );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -304,6 +312,70 @@ void S_SoundList( void )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if USE_VOIP
|
||||
/*
|
||||
=================
|
||||
S_StartCapture
|
||||
=================
|
||||
*/
|
||||
void S_StartCapture( void )
|
||||
{
|
||||
if( si.StartCapture ) {
|
||||
si.StartCapture( );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
S_AvailableCaptureSamples
|
||||
=================
|
||||
*/
|
||||
int S_AvailableCaptureSamples( void )
|
||||
{
|
||||
if( si.AvailableCaptureSamples ) {
|
||||
return si.AvailableCaptureSamples( );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
S_Capture
|
||||
=================
|
||||
*/
|
||||
void S_Capture( int samples, byte *data )
|
||||
{
|
||||
if( si.Capture ) {
|
||||
si.Capture( samples, data );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
S_StopCapture
|
||||
=================
|
||||
*/
|
||||
void S_StopCapture( void )
|
||||
{
|
||||
if( si.StopCapture ) {
|
||||
si.StopCapture( );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
S_MasterGain
|
||||
=================
|
||||
*/
|
||||
void S_MasterGain( float gain )
|
||||
{
|
||||
if( si.MasterGain ) {
|
||||
si.MasterGain( gain );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue