From 8e1bb12684fa1b9648a9fe57c0b1cc96dd702e86 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 31 Jul 2011 16:47:25 -0700 Subject: [PATCH] Better handle some error codes --- buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buffer.c b/buffer.c index 1b7642d..66bc175 100644 --- a/buffer.c +++ b/buffer.c @@ -767,12 +767,12 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar wfe->Samples.wReserved, wfe->dwChannelMask, debugstr_guid(&wfe->SubFormat)); - hr = DSERR_INVALIDCALL; fmt_str = get_fmtstr_EXT(prim, format, &pBuffer->format); } else ERR("Unhandled formattag 0x%04x\n", format->wFormatTag); + hr = DSERR_INVALIDCALL; if(!fmt_str) goto fail; @@ -807,12 +807,12 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar wfe->Samples.wReserved, wfe->dwChannelMask, debugstr_guid(&wfe->SubFormat)); - hr = DSERR_INVALIDCALL; pBuffer->buf_format = get_fmt_EXT(format, &pBuffer->format, &pBuffer->in_chans, &pBuffer->in_type); } else ERR("Unhandled formattag 0x%04x\n", format->wFormatTag); + hr = DSERR_INVALIDCALL; if(prim->ExtAL.IsBufferFormatSupportedSOFT(pBuffer->buf_format) == AL_FALSE) { WARN("Unsupported OpenAL format: 0x%x\n", pBuffer->buf_format); -- 2.11.4.GIT