aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/dsound.c1
-rw-r--r--Alc/oss.c6
-rw-r--r--Alc/pulseaudio.c1
-rw-r--r--Alc/solaris.c3
-rw-r--r--Alc/winmm.c14
5 files changed, 14 insertions, 11 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index f513f2ef..5779e5f7 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -296,6 +296,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
if(pData->lpDS)
IDirectSound_Release(pData->lpDS);
free(pData);
+ AL_PRINT("Device init failed: 0x%08lx\n", hr);
return ALC_FALSE;
}
diff --git a/Alc/oss.c b/Alc/oss.c
index 8fda248c..66c3c55b 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -166,8 +166,7 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName
if(data->fd == -1)
{
free(data);
- if(errno != ENOENT)
- AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
+ AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
return ALC_FALSE;
}
@@ -336,8 +335,7 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName)
if(data->fd == -1)
{
free(data);
- if(errno != ENOENT)
- AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
+ AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
return ALC_FALSE;
}
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 4fb3c8e8..1fa16d7e 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -830,6 +830,7 @@ static ALCboolean pulse_open_playback(ALCdevice *device, const ALCchar *device_n
if(ppa_stream_is_suspended(stream))
{
+ AL_PRINT("Device is suspended\n");
ppa_stream_disconnect(stream);
ppa_stream_unref(stream);
ppa_threaded_mainloop_unlock(data->loop);
diff --git a/Alc/solaris.c b/Alc/solaris.c
index 4fbb1942..275d81ac 100644
--- a/Alc/solaris.c
+++ b/Alc/solaris.c
@@ -111,8 +111,7 @@ static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *device
if(data->fd == -1)
{
free(data);
- if(errno != ENOENT)
- AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
+ AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
return ALC_FALSE;
}
diff --git a/Alc/winmm.c b/Alc/winmm.c
index 70398a17..61ff87b7 100644
--- a/Alc/winmm.c
+++ b/Alc/winmm.c
@@ -190,6 +190,7 @@ static ALCboolean WinMMOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName
ALint lDeviceID = 0;
ALbyte *BufferData;
ALint lBufferSize;
+ MMRESULT res;
ALuint i;
if(!CaptureDeviceList)
@@ -240,16 +241,19 @@ static ALCboolean WinMMOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName
wfexCaptureFormat.nBlockAlign;
wfexCaptureFormat.cbSize = 0;
- if (waveInOpen(&pData->hWaveInHandle, lDeviceID, &wfexCaptureFormat, (DWORD_PTR)&WaveInProc, (DWORD_PTR)pDevice, CALLBACK_FUNCTION) != MMSYSERR_NOERROR)
+ if((res=waveInOpen(&pData->hWaveInHandle, lDeviceID, &wfexCaptureFormat, (DWORD_PTR)&WaveInProc, (DWORD_PTR)pDevice, CALLBACK_FUNCTION)) != MMSYSERR_NOERROR)
+ {
+ AL_PRINT("waveInOpen failed: %u\n", res);
goto failure;
+ }
pData->hWaveInHdrEvent = CreateEvent(NULL, AL_TRUE, AL_FALSE, "WaveInAllHeadersReturned");
- if (pData->hWaveInHdrEvent == NULL)
- goto failure;
-
pData->hWaveInThreadEvent = CreateEvent(NULL, AL_TRUE, AL_FALSE, "WaveInThreadDestroyed");
- if (pData->hWaveInThreadEvent == NULL)
+ if(pData->hWaveInHdrEvent == NULL || pData->hWaveInThreadEvent == NULL)
+ {
+ AL_PRINT("CreateEvent failed: %lu\n", GetLastError());
goto failure;
+ }
// Allocate circular memory buffer for the captured audio
ulCapturedDataSize = pDevice->UpdateSize*pDevice->NumUpdates;