2007-06-28 10:47:08 -07:00
|
|
|
/* Handles the two CD issue */
|
|
|
|
/* Alex McLean */
|
|
|
|
|
2006-04-08 08:58:27 -07:00
|
|
|
/* seems to be responsible for playing music in-game,
|
|
|
|
* move that to somewhere else
|
|
|
|
*/
|
|
|
|
|
2006-05-27 09:37:17 -07:00
|
|
|
#include "lib/framework/frame.h"
|
2006-04-08 08:58:27 -07:00
|
|
|
|
2006-05-27 09:37:17 -07:00
|
|
|
#include "lib/sound/audio.h"
|
|
|
|
#include "lib/sound/track.h"
|
2007-06-28 10:47:08 -07:00
|
|
|
#include "cdspan.h"
|
|
|
|
|
2006-11-03 13:35:50 -08:00
|
|
|
static char g_szCurDriveName[MAX_STR] = "";
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
void
|
2006-11-03 13:35:50 -08:00
|
|
|
cdspan_PlayInGameAudio( char szFileName[], SDWORD iVol )
|
2007-06-28 10:47:08 -07:00
|
|
|
{
|
2006-11-03 13:35:50 -08:00
|
|
|
char szStream[MAX_STR];// szDrive[MAX_STR] = "",
|
2007-06-28 10:47:08 -07:00
|
|
|
BOOL bPlaying = FALSE;
|
|
|
|
|
|
|
|
audio_StopAll();
|
|
|
|
|
2006-09-08 13:01:09 -07:00
|
|
|
sprintf( szStream, "%s%s", g_szCurDriveName, szFileName );
|
2007-06-28 10:47:08 -07:00
|
|
|
bPlaying = audio_PlayStream( szStream, iVol, NULL );
|
|
|
|
|
|
|
|
/* try playing from hard disk */
|
|
|
|
if ( bPlaying == FALSE )
|
|
|
|
{
|
2006-10-07 07:13:47 -07:00
|
|
|
sprintf( szStream, "audio/%s", szFileName );
|
2007-06-28 10:47:08 -07:00
|
|
|
bPlaying = audio_PlayStream( szStream, iVol, NULL );
|
|
|
|
}
|
|
|
|
}
|