Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fa2d39e4
Commit
fa2d39e4
authored
Mar 12, 2008
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreaudio: Standardize on DRV_SUCCESS/FAILURE status codes for setup functions.
parent
2de65355
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
audio.c
dlls/winecoreaudio.drv/audio.c
+8
-8
coreaudio.c
dlls/winecoreaudio.drv/coreaudio.c
+2
-2
midi.c
dlls/winecoreaudio.drv/midi.c
+3
-3
mixer.c
dlls/winecoreaudio.drv/mixer.c
+3
-3
No files found.
dlls/winecoreaudio.drv/audio.c
View file @
fa2d39e4
...
...
@@ -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
)
...
...
dlls/winecoreaudio.drv/coreaudio.c
View file @
fa2d39e4
...
...
@@ -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
;
}
/**************************************************************************
...
...
dlls/winecoreaudio.drv/midi.c
View file @
fa2d39e4
...
...
@@ -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
;
}
...
...
dlls/winecoreaudio.drv/mixer.c
View file @
fa2d39e4
...
...
@@ -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
;
}
/**************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment