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
5319b64b
Commit
5319b64b
authored
Dec 28, 2006
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Initial implementation of widGetDevCaps.
parent
eccfe6e8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
11 deletions
+49
-11
audio.c
dlls/winmm/winecoreaudio/audio.c
+49
-11
No files found.
dlls/winmm/winecoreaudio/audio.c
View file @
5319b64b
...
@@ -158,27 +158,33 @@ typedef struct {
...
@@ -158,27 +158,33 @@ typedef struct {
}
WINE_WAVEOUT
;
}
WINE_WAVEOUT
;
typedef
struct
{
typedef
struct
{
/* Access to the following fields is synchronized across threads. */
volatile
int
state
;
volatile
int
state
;
CoreAudio_Device
*
cadev
;
/* Synchronization mechanism to protect above fields */
OSSpinLock
lock
;
/* Capabilities description */
WAVEINCAPSW
caps
;
/* Record the arguments used when opening the device. */
WAVEOPENDESC
waveDesc
;
WAVEOPENDESC
waveDesc
;
WORD
wFlags
;
WORD
wFlags
;
/* These fields aren't used. */
#if 0
CoreAudio_Device *cadev;
PCMWAVEFORMAT format;
PCMWAVEFORMAT format;
LPWAVEHDR lpQueuePtr;
LPWAVEHDR lpQueuePtr;
DWORD dwTotalRecorded;
DWORD dwTotalRecorded;
WAVEINCAPSW
caps
;
AudioUnit audioUnit;
AudioUnit audioUnit;
AudioStreamBasicDescription streamDescription;
AudioStreamBasicDescription streamDescription;
#endif
/* BOOL bTriggerSupport;
WORD wDevID;
char interface_name[32];*/
/* synchronization stuff */
OSSpinLock
lock
;
}
WINE_WAVEIN
;
}
WINE_WAVEIN
;
static
WINE_WAVEOUT
WOutDev
[
MAX_WAVEOUTDRV
];
static
WINE_WAVEOUT
WOutDev
[
MAX_WAVEOUTDRV
];
static
WINE_WAVEIN
WInDev
[
MAX_WAVEINDRV
];
static
CFMessagePortRef
Port_SendToMessageThread
;
static
CFMessagePortRef
Port_SendToMessageThread
;
...
@@ -506,6 +512,38 @@ LONG CoreAudio_WaveInit(void)
...
@@ -506,6 +512,38 @@ LONG CoreAudio_WaveInit(void)
WOutDev
[
i
].
lock
=
0
;
/* initialize the mutex */
WOutDev
[
i
].
lock
=
0
;
/* initialize the mutex */
}
}
for
(
i
=
0
;
i
<
MAX_WAVEINDRV
;
++
i
)
{
memset
(
&
WInDev
[
i
],
0
,
sizeof
(
WInDev
[
i
]));
/* Establish preconditions for widOpen */
WInDev
[
i
].
state
=
WINE_WS_CLOSED
;
WInDev
[
i
].
lock
=
0
;
/* initialize the mutex */
/* Fill in capabilities. widGetDevCaps can be called at any time. */
WInDev
[
i
].
caps
.
wMid
=
0xcafe
;
/* Manufac ID */
WInDev
[
i
].
caps
.
wPid
=
0x0001
;
/* Product ID */
WInDev
[
i
].
caps
.
vDriverVersion
=
0x0001
;
snprintf
(
szPname
,
sizeof
(
szPname
),
"CoreAudio WaveIn %d"
,
i
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szPname
,
-
1
,
WInDev
[
i
].
caps
.
szPname
,
sizeof
(
WInDev
[
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_4M08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_4S08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_4S16
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_4M16
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_2M08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_2S08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_2M16
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_2S16
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_1M08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_1S08
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_1M16
;
WInDev
[
i
].
caps
.
dwFormats
|=
WAVE_FORMAT_1S16
;
WInDev
[
i
].
caps
.
wChannels
=
2
;
}
/* create mach messages handler */
/* create mach messages handler */
srandomdev
();
srandomdev
();
messageThreadPortName
=
CFStringCreateWithFormat
(
kCFAllocatorDefault
,
NULL
,
messageThreadPortName
=
CFStringCreateWithFormat
(
kCFAllocatorDefault
,
NULL
,
...
@@ -1456,8 +1494,8 @@ static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSW lpCaps, DWORD dwSize)
...
@@ -1456,8 +1494,8 @@ static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSW lpCaps, DWORD dwSize)
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
FIXME
(
"unimplemented
\n
"
);
memcpy
(
lpCaps
,
&
WInDev
[
wDevID
].
caps
,
min
(
dwSize
,
sizeof
(
*
lpCaps
))
);
return
MMSYSERR_NO
TENABLED
;
return
MMSYSERR_NO
ERROR
;
}
}
...
...
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