aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c11
-rw-r--r--OpenAL32/Include/alMain.h4
2 files changed, 8 insertions, 7 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e4318fa6..43e31d89 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2674,17 +2674,18 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice)
*
* Open a loopback device, for manual rendering.
*/
-ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(ALCdevice *device)
+ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName)
{
+ ALCdevice *device;
+
DO_INITCONFIG();
- /* Make sure the device, if specified, belongs to us. */
- if(device && !(device=VerifyDevice(device)))
+ /* Make sure the device name, if specified, is us. */
+ if(deviceName && strcmp(deviceName, alcDefaultName) != 0)
{
- alcSetError(device, ALC_INVALID_DEVICE);
+ alcSetError(NULL, ALC_INVALID_VALUE);
return NULL;
}
- if(device) ALCdevice_DecRef(device);
device = calloc(1, sizeof(ALCdevice));
if(!device)
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 85807f6a..2fbea8c3 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -39,11 +39,11 @@
#define ALC_6POINT1_SOFT 0x1505 /* (WFX order) */
#define ALC_7POINT1_SOFT 0x1506 /* (WFX order) */
-typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(ALCdevice*);
+typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*);
typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei);
#ifdef AL_ALEXT_PROTOTYPES
-ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(ALCdevice *device);
+ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName);
ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type);
ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
#endif