sound: move related function declarations to platform header. Remove unused.

This commit is contained in:
Alibek Omarov
2019-01-07 04:07:06 +03:00
parent 908082097f
commit 80fc7209ed
6 changed files with 22 additions and 31 deletions
+16
View File
@@ -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
+2 -2
View File
@@ -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;
+3 -12
View File
@@ -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 );
}