diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp index b3622c9acd..faebe36caf 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -62,7 +62,7 @@ bool RageSoundDriver_OSS::GetData() /* Look for a free buffer. */ audio_buf_info ab; if( ioctl(fd, SNDCTL_DSP_GETOSPACE, &ab) == -1 ) - RageException::Throw("ioctl(SNDCTL_DSP_GETOSPACE): %s", strerror(errno) ); + FAIL_M( ssprintf("ioctl(SNDCTL_DSP_GETOSPACE): %s", strerror(errno)) ); if( !ab.fragments ) return false; @@ -77,7 +77,7 @@ bool RageSoundDriver_OSS::GetData() int wrote = write( fd, buf, chunksize ); if( wrote != chunksize ) - RageException::Throw( "write didn't: %i (%s)", wrote, wrote == -1? strerror(errno): "" ); + FAIL_M( ssprintf("write didn't: %i (%s)", wrote, wrote == -1? strerror(errno): "") ); /* Increment last_cursor_pos. */ last_cursor_pos += chunksize / bytes_per_frame; @@ -93,7 +93,7 @@ int64_t RageSoundDriver_OSS::GetPosition() const int delay; if(ioctl(fd, SNDCTL_DSP_GETODELAY, &delay) == -1) - RageException::Throw("RageSoundDriver_OSS: ioctl(SNDCTL_DSP_GETODELAY): %s", strerror(errno)); + FAIL_M( ssprintf("RageSoundDriver_OSS: ioctl(SNDCTL_DSP_GETODELAY): %s", strerror(errno)) ); return last_cursor_pos - (delay / bytes_per_frame); } diff --git a/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp b/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp index 3edc09f52c..91ad896fd5 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_WaveOut.cpp @@ -73,8 +73,8 @@ bool RageSoundDriver_WaveOut::GetData() this->Mix( (int16_t *) m_aBuffers[b].lpData, chunksize_frames, m_iLastCursorPos, GetPosition() ); MMRESULT ret = waveOutWrite( m_hWaveOut, &m_aBuffers[b], sizeof(m_aBuffers[b]) ); - if(ret != MMSYSERR_NOERROR) - RageException::Throw(wo_ssprintf(ret, "waveOutWrite failed")); + if( ret != MMSYSERR_NOERROR ) + FAIL_M( wo_ssprintf(ret, "waveOutWrite failed") ); /* Increment m_iLastCursorPos. */ m_iLastCursorPos += chunksize_frames; @@ -94,7 +94,7 @@ int64_t RageSoundDriver_WaveOut::GetPosition() const tm.wType = TIME_SAMPLES; MMRESULT ret = waveOutGetPosition( m_hWaveOut, &tm, sizeof(tm) ); if( ret != MMSYSERR_NOERROR ) - RageException::Throw( wo_ssprintf(ret, "waveOutGetPosition failed") ); + FAIL_M( wo_ssprintf(ret, "waveOutGetPosition failed") ); return tm.u.sample; }