int SoundDriver_PCM_GetError(void) { if (!SoundDriver_IsPCMSupported(ASS_PCMSoundDriver)) { return -1; } return SoundDrivers[ASS_PCMSoundDriver].GetError(); }
int FX_Init ( int SoundCard, int numvoices, int * numchannels, int * samplebits, int * mixrate, void * initdata ) { int status; int devicestatus; if ( FX_Installed ) { FX_Shutdown(); } if (SoundCard == ASS_AutoDetect) { #if 0 //defined __APPLE__ SoundCard = ASS_CoreAudio; #elif defined _WIN32 SoundCard = ASS_DirectSound; #elif defined HAVE_SDL SoundCard = ASS_SDL; #else SoundCard = ASS_NoSound; #endif } if (SoundCard < 0 || SoundCard >= ASS_NumSoundCards) { FX_SetErrorCode( FX_InvalidCard ); status = FX_Error; return status; } if (SoundDriver_IsPCMSupported(SoundCard) == 0) { // unsupported cards fall back to no sound SoundCard = ASS_NoSound; } status = FX_Ok; devicestatus = MV_Init( SoundCard, mixrate, numvoices, numchannels, samplebits, initdata ); if ( devicestatus != MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); status = FX_Error; } if ( status == FX_Ok ) { FX_Installed = TRUE; } return( status ); }
const char * SoundDriver_PCM_ErrorString( int ErrorNumber ) { if (ASS_PCMSoundDriver < 0 || ASS_PCMSoundDriver >= ASS_NumSoundCards) { return "No sound driver selected."; } if (!SoundDriver_IsPCMSupported(ASS_PCMSoundDriver)) { return "Unsupported sound driver selected."; } return SoundDrivers[ASS_PCMSoundDriver].ErrorString(ErrorNumber); }