coreaudio: Standardize on DRV_SUCCESS/FAILURE status codes for setup functions.
This commit is contained in:
parent
2de653552c
commit
fa2d39e45f
|
@ -521,15 +521,15 @@ LONG CoreAudio_WaveInit(void)
|
|||
(char) (status >> 16),
|
||||
(char) (status >> 8),
|
||||
(char) status);
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
if (CoreAudio_DefaultDevice.outputDeviceID == kAudioDeviceUnknown) {
|
||||
ERR("AudioHardwareGetProperty: CoreAudio_DefaultDevice.outputDeviceID == kAudioDeviceUnknown\n");
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
if ( ! CoreAudio_GetDevCaps() )
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
|
||||
CoreAudio_DefaultDevice.interface_name=HeapAlloc(GetProcessHeap(),0,strlen(CoreAudio_DefaultDevice.dev_name)+1);
|
||||
sprintf(CoreAudio_DefaultDevice.interface_name, "%s", CoreAudio_DefaultDevice.dev_name);
|
||||
|
@ -646,7 +646,7 @@ LONG CoreAudio_WaveInit(void)
|
|||
if (!messageThreadPortName)
|
||||
{
|
||||
ERR("Can't create message thread port name\n");
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
port_ReceiveInMessageThread = CFMessagePortCreateLocal(kCFAllocatorDefault, messageThreadPortName,
|
||||
|
@ -655,7 +655,7 @@ LONG CoreAudio_WaveInit(void)
|
|||
{
|
||||
ERR("Can't create message thread local port\n");
|
||||
CFRelease(messageThreadPortName);
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
Port_SendToMessageThread = CFMessagePortCreateRemote(kCFAllocatorDefault, messageThreadPortName);
|
||||
|
@ -664,7 +664,7 @@ LONG CoreAudio_WaveInit(void)
|
|||
{
|
||||
ERR("Can't create port for sending to message thread\n");
|
||||
CFRelease(port_ReceiveInMessageThread);
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
/* Cannot WAIT for any events because we are called from the loader (which has a lock on loading stuff) */
|
||||
|
@ -681,12 +681,12 @@ LONG CoreAudio_WaveInit(void)
|
|||
CFRelease(port_ReceiveInMessageThread);
|
||||
CFRelease(Port_SendToMessageThread);
|
||||
Port_SendToMessageThread = NULL;
|
||||
return 1;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
/* The message thread is responsible for releasing port_ReceiveInMessageThread. */
|
||||
|
||||
return 0;
|
||||
return DRV_SUCCESS;
|
||||
}
|
||||
|
||||
void CoreAudio_WaveRelease(void)
|
||||
|
|
|
@ -45,7 +45,7 @@ static LRESULT CoreAudio_drvLoad(void)
|
|||
CoreAudio_WaveInit();
|
||||
CoreAudio_MIDIInit();
|
||||
CoreAudio_MixerInit();
|
||||
return 1;
|
||||
return DRV_SUCCESS;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -57,7 +57,7 @@ static LRESULT CoreAudio_drvFree(void)
|
|||
CoreAudio_WaveRelease();
|
||||
CoreAudio_MIDIRelease();
|
||||
CoreAudio_MixerRelease();
|
||||
return 1;
|
||||
return DRV_SUCCESS;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -109,7 +109,7 @@ LONG CoreAudio_MIDIInit(void)
|
|||
{
|
||||
CFRelease(name);
|
||||
ERR("can't create wineMIDIClient\n");
|
||||
return 0;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
CFRelease(name);
|
||||
|
||||
|
@ -193,7 +193,7 @@ LONG CoreAudio_MIDIInit(void)
|
|||
destinations[i].caps.wVoices = 16;
|
||||
destinations[i].caps.wNotes = 16;
|
||||
}
|
||||
return 1;
|
||||
return DRV_SUCCESS;
|
||||
}
|
||||
|
||||
LONG CoreAudio_MIDIRelease(void)
|
||||
|
@ -214,7 +214,7 @@ LONG CoreAudio_MIDIRelease(void)
|
|||
|
||||
HeapFree(GetProcessHeap(), 0, sources);
|
||||
HeapFree(GetProcessHeap(), 0, destinations);
|
||||
return 1;
|
||||
return DRV_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ LONG CoreAudio_MixerInit(void)
|
|||
(char) (status >> 16),
|
||||
(char) (status >> 8),
|
||||
(char) status);
|
||||
return 0;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
numLines = propertySize / sizeof(AudioDeviceID);
|
||||
|
@ -495,7 +495,7 @@ LONG CoreAudio_MixerInit(void)
|
|||
MIX_FillControls();
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, deviceArray);
|
||||
return 1;
|
||||
return DRV_SUCCESS;
|
||||
|
||||
error:
|
||||
if (mixer.lines)
|
||||
|
@ -510,7 +510,7 @@ error:
|
|||
HeapFree(GetProcessHeap(), 0, deviceArray);
|
||||
if (mixer.mixerCtrls)
|
||||
HeapFree(GetProcessHeap(), 0, mixer.mixerCtrls);
|
||||
return 0;
|
||||
return DRV_FAILURE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
Loading…
Reference in New Issue