mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 14:42:05 +08:00
sound: move related function declarations to platform header. Remove unused.
This commit is contained in:
@@ -90,6 +90,22 @@ int R_MaxVideoModes();
|
||||
vidmode_t*R_GetVideoMode( int num );
|
||||
void* GL_GetProcAddress( const char *name ); // RenderAPI requirement
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
AUDIO INPUT/OUTPUT
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
// initializes cycling through a DMA buffer and returns information on it
|
||||
qboolean SNDDMA_Init( void *hInst );
|
||||
int SNDDMA_GetSoundtime( void );
|
||||
void SNDDMA_Shutdown( void );
|
||||
void SNDDMA_BeginPainting( void );
|
||||
void SNDDMA_Submit( void );
|
||||
void SNDDMA_Activate( qboolean active ); // pause audio
|
||||
// void SNDDMA_PrintDeviceName( void ); // unused
|
||||
// void SNDDMA_LockSound( void ); // unused
|
||||
// void SNDDMA_UnlockSound( void ); // unused
|
||||
|
||||
#endif // PLATFORM_H
|
||||
|
||||
@@ -408,7 +408,7 @@ static void SDLash_EventFilter( SDL_Event *event )
|
||||
IN_ActivateMouse(true);
|
||||
if( snd_mute_losefocus->value )
|
||||
{
|
||||
S_Activate( true );
|
||||
SNDDMA_Activate( true );
|
||||
}
|
||||
host.force_draw_version = true;
|
||||
host.force_draw_version_time = host.realtime + FORCE_DRAW_VERSION_TIME;
|
||||
@@ -427,7 +427,7 @@ static void SDLash_EventFilter( SDL_Event *event )
|
||||
IN_DeactivateMouse();
|
||||
if( snd_mute_losefocus->value )
|
||||
{
|
||||
S_Activate( false );
|
||||
SNDDMA_Activate( false );
|
||||
}
|
||||
host.force_draw_version = true;
|
||||
host.force_draw_version_time = host.realtime + 2;
|
||||
|
||||
@@ -14,6 +14,7 @@ GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "platform/platform.h"
|
||||
#if XASH_SOUND == SOUND_SDL
|
||||
|
||||
#include "sound.h"
|
||||
@@ -238,23 +239,13 @@ void SNDDMA_Shutdown( void )
|
||||
|
||||
/*
|
||||
===========
|
||||
S_PrintDeviceName
|
||||
===========
|
||||
*/
|
||||
void S_PrintDeviceName( void )
|
||||
{
|
||||
Msg( "Audio: SDL (driver: %s)\n", SDL_GetCurrentAudioDriver( ) );
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
S_Activate
|
||||
SNDDMA_Activate
|
||||
Called when the main window gains or loses focus.
|
||||
The window have been destroyed and recreated
|
||||
between a deactivate and an activate.
|
||||
===========
|
||||
*/
|
||||
void S_Activate( qboolean active )
|
||||
void SNDDMA_Activate( qboolean active )
|
||||
{
|
||||
SDL_PauseAudioDevice( sdl_dev, !active );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user