mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-03-10 23:31:37 +00:00
MB: SSI263: Don't try to create DS soundbuffer if DS is unavailable
This commit is contained in:
parent
b5544142e0
commit
a6416acb87
@ -842,6 +842,9 @@ bool SSI263::DSInit(void)
|
||||
// Create single SSI263 voice
|
||||
//
|
||||
|
||||
if (!g_bDSAvailable)
|
||||
return false;
|
||||
|
||||
HRESULT hr = DSGetSoundBuffer(&SSI263SingleVoice, DSBCAPS_CTRLVOLUME, m_kDSBufferByteSize, SAMPLE_RATE_SSI263, m_kNumChannels, "SSI263");
|
||||
LogFileOutput("SSI263::DSInit: DSGetSoundBuffer(), hr=0x%08X\n", hr);
|
||||
if (FAILED(hr))
|
||||
|
@ -184,6 +184,9 @@ HRESULT DSGetLock(LPDIRECTSOUNDBUFFER pVoice, DWORD dwOffset, DWORD dwBytes,
|
||||
|
||||
HRESULT DSGetSoundBuffer(VOICE* pVoice, DWORD dwFlags, DWORD dwBufferSize, DWORD nSampleRate, int nChannels, const char* pszDevName)
|
||||
{
|
||||
if (!g_lpDS)
|
||||
return E_FAIL;
|
||||
|
||||
pVoice->name = pszDevName;
|
||||
|
||||
WAVEFORMATEX wavfmt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user