Add some extra functions to query the music

player state
This commit is contained in:
Eric Wasylishen 2011-01-18 13:30:17 -07:00
parent d986fed089
commit 09b23123d0
2 changed files with 23 additions and 0 deletions

View File

@ -1133,6 +1133,27 @@ qboolean S_BackgroundTrackIsPlaying( void )
return (NULL != s_backgroundStream) && (!s_backgroundPaused);
}
/*
==========================
S_BackgroundTrackIsPaused
==========================
*/
qboolean S_BackgroundTrackIsPaused( void )
{
return (NULL != s_backgroundStream) && (s_backgroundPaused);
}
/*
==========================
S_BackgroundTrackIsLooping
==========================
*/
qboolean S_BackgroundTrackIsLooping( void )
{
return s_backgroundLoop;
}
void S_BlockSound (void)
{
/* FIXME: do we really need the blocking at the

View File

@ -148,6 +148,8 @@ void S_Base_StopBackgroundTrack( void );
qboolean S_Base_StartBackgroundTrack( const char *intro, qboolean loop, S_BackgroundTrackFinishedCallback callback, void *userdata );
void S_UpdateBackgroundTrack( void );
qboolean S_BackgroundTrackIsPlaying( void );
qboolean S_BackgroundTrackIsPaused( void );
qboolean S_BackgroundTrackIsLooping( void );
/* resamples a whole file. return value must be freed with free() */
void *Snd_Resample(int inrate, int inwidth, int innumsamples, int channels, const void *indata,