diff options
Diffstat (limited to 'src/client/snd_main.c')
-rw-r--r-- | src/client/snd_main.c | 76 |
1 files changed, 74 insertions, 2 deletions
diff --git a/src/client/snd_main.c b/src/client/snd_main.c index b8dfdf36..d3391b23 100644 --- a/src/client/snd_main.c +++ b/src/client/snd_main.c @@ -64,6 +64,14 @@ static qboolean S_ValidSoundInterface( soundInterface_t *si ) if( !si->SoundInfo ) return qfalse; if( !si->SoundList ) return qfalse; +#ifdef 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; } @@ -120,11 +128,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 ); } } @@ -319,6 +327,70 @@ void S_SoundList( void ) } } + +#ifdef 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 + //============================================================================= /* |