Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7d43d7bb
Commit
7d43d7bb
authored
Sep 03, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Sep 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the drivers to get device capabilities and property sets.
parent
3e037992
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
22 deletions
+34
-22
buffer.c
dlls/dsound/buffer.c
+3
-0
dsound_main.c
dlls/dsound/dsound_main.c
+24
-21
propset.c
dlls/dsound/propset.c
+0
-0
audio.c
dlls/winmm/winealsa/audio.c
+2
-0
audio.c
dlls/winmm/wineaudioio/audio.c
+2
-0
audio.c
dlls/winmm/wineoss/audio.c
+3
-1
No files found.
dlls/dsound/buffer.c
View file @
7d43d7bb
...
...
@@ -1044,6 +1044,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
dsb
->
dsb
=
0
;
dsb
->
dsound
=
ds
;
dsb
->
lpVtbl
=
&
dsbvt
;
dsb
->
iks
=
NULL
;
memcpy
(
&
dsb
->
dsbd
,
dsbd
,
sizeof
(
*
dsbd
));
if
(
wfex
)
...
...
@@ -1064,7 +1065,9 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
else
capf
|=
DSCAPS_SECONDARYMONO
;
if
(
wfex
->
wBitsPerSample
==
16
)
capf
|=
DSCAPS_SECONDARY16BIT
;
else
capf
|=
DSCAPS_SECONDARY8BIT
;
use_hw
=
(
ds
->
drvcaps
.
dwFlags
&
capf
)
==
capf
;
TRACE
(
"use_hw = 0x%08x, capf = 0x%08lx, ds->drvcaps.dwFlags = 0x%08lx
\n
"
,
use_hw
,
capf
,
ds
->
drvcaps
.
dwFlags
);
/* FIXME: check hardware sample rate mixing capabilities */
/* FIXME: check app hints for software/hardware buffer (STATIC, LOCHARDWARE, etc) */
...
...
dlls/dsound/dsound_main.c
View file @
7d43d7bb
...
...
@@ -671,37 +671,37 @@ static HRESULT WINAPI IDirectSoundImpl_GetCaps(LPDIRECTSOUND8 iface,LPDSCAPS lpD
return
DSERR_INVALIDPARAM
;
}
lpDSCaps
->
dwFlags
=
This
->
drvcaps
.
dwFlags
;
lpDSCaps
->
dwFlags
=
This
->
drvcaps
.
dwFlags
;
TRACE
(
"(flags=0x%08lx)
\n
"
,
lpDSCaps
->
dwFlags
);
/* FIXME: copy caps from This->drv */
lpDSCaps
->
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
lpDSCaps
->
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
lpDSCaps
->
dwMinSecondarySampleRate
=
This
->
drvcaps
.
dwMinSecondarySampleRate
;
lpDSCaps
->
dwMaxSecondarySampleRate
=
This
->
drvcaps
.
dwMaxSecondarySampleRate
;
lpDSCaps
->
dwPrimaryBuffers
=
1
;
lpDSCaps
->
dwPrimaryBuffers
=
This
->
drvcaps
.
dwPrimaryBuffers
;
lpDSCaps
->
dwMaxHwMixingAllBuffers
=
0
;
lpDSCaps
->
dwMaxHwMixingStaticBuffers
=
0
;
lpDSCaps
->
dwMaxHwMixingStreamingBuffers
=
0
;
lpDSCaps
->
dwMaxHwMixingAllBuffers
=
This
->
drvcaps
.
dwMaxHwMixingAllBuffers
;
lpDSCaps
->
dwMaxHwMixingStaticBuffers
=
This
->
drvcaps
.
dwMaxHwMixingStaticBuffers
;
lpDSCaps
->
dwMaxHwMixingStreamingBuffers
=
This
->
drvcaps
.
dwMaxHwMixingStreamingBuffers
;
lpDSCaps
->
dwFreeHwMixingAllBuffers
=
0
;
lpDSCaps
->
dwFreeHwMixingStaticBuffers
=
0
;
lpDSCaps
->
dwFreeHwMixingStreamingBuffers
=
0
;
lpDSCaps
->
dwFreeHwMixingAllBuffers
=
This
->
drvcaps
.
dwFreeHwMixingAllBuffers
;
lpDSCaps
->
dwFreeHwMixingStaticBuffers
=
This
->
drvcaps
.
dwFreeHwMixingStaticBuffers
;
lpDSCaps
->
dwFreeHwMixingStreamingBuffers
=
This
->
drvcaps
.
dwFreeHwMixingStreamingBuffers
;
lpDSCaps
->
dwMaxHw3DAllBuffers
=
0
;
lpDSCaps
->
dwMaxHw3DStaticBuffers
=
0
;
lpDSCaps
->
dwMaxHw3DStreamingBuffers
=
0
;
lpDSCaps
->
dwMaxHw3DAllBuffers
=
This
->
drvcaps
.
dwMaxHw3DAllBuffers
;
lpDSCaps
->
dwMaxHw3DStaticBuffers
=
This
->
drvcaps
.
dwMaxHw3DStaticBuffers
;
lpDSCaps
->
dwMaxHw3DStreamingBuffers
=
This
->
drvcaps
.
dwMaxHw3DStreamingBuffers
;
lpDSCaps
->
dwFreeHw3DAllBuffers
=
0
;
lpDSCaps
->
dwFreeHw3DStaticBuffers
=
0
;
lpDSCaps
->
dwFreeHw3DStreamingBuffers
=
0
;
lpDSCaps
->
dwFreeHw3DAllBuffers
=
This
->
drvcaps
.
dwFreeHw3DAllBuffers
;
lpDSCaps
->
dwFreeHw3DStaticBuffers
=
This
->
drvcaps
.
dwFreeHw3DStaticBuffers
;
lpDSCaps
->
dwFreeHw3DStreamingBuffers
=
This
->
drvcaps
.
dwFreeHw3DStreamingBuffers
;
lpDSCaps
->
dwTotalHwMemBytes
=
0
;
lpDSCaps
->
dwTotalHwMemBytes
=
This
->
drvcaps
.
dwTotalHwMemBytes
;
lpDSCaps
->
dwFreeHwMemBytes
=
0
;
lpDSCaps
->
dwFreeHwMemBytes
=
This
->
drvcaps
.
dwFreeHwMemBytes
;
lpDSCaps
->
dwMaxContigFreeHwMemBytes
=
0
;
lpDSCaps
->
dwMaxContigFreeHwMemBytes
=
This
->
drvcaps
.
dwMaxContigFreeHwMemBytes
;
/* driver doesn't have these */
lpDSCaps
->
dwUnlockTransferRateHwBuffers
=
4096
;
/* But we have none... */
lpDSCaps
->
dwPlayCpuOverheadSwBuffers
=
1
;
/* 1% */
...
...
@@ -1099,7 +1099,7 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
*
ippDS
=
NULL
;
return
err
;
}
(
*
ippDS
)
->
drvcaps
.
dwFlags
=
0
;
ZeroMemory
(
&
(
*
ippDS
)
->
drvcaps
,
sizeof
((
*
ippDS
)
->
drvcaps
))
;
if
((
woc
.
dwFormats
&
WAVE_FORMAT_1M08
)
||
(
woc
.
dwFormats
&
WAVE_FORMAT_2M08
)
||
(
woc
.
dwFormats
&
WAVE_FORMAT_4M08
)
||
...
...
@@ -1134,6 +1134,9 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
}
if
(
ds_emuldriver
)
(
*
ippDS
)
->
drvcaps
.
dwFlags
|=
DSCAPS_EMULDRIVER
;
(
*
ippDS
)
->
drvcaps
.
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
(
*
ippDS
)
->
drvcaps
.
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
(
*
ippDS
)
->
drvcaps
.
dwPrimaryBuffers
=
1
;
}
DSOUND_RecalcVolPan
(
&
((
*
ippDS
)
->
volpan
));
...
...
dlls/dsound/propset.c
View file @
7d43d7bb
This diff is collapsed.
Click to expand it.
dlls/winmm/winealsa/audio.c
View file @
7d43d7bb
...
...
@@ -2009,6 +2009,8 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap
pCaps
->
dwPrimaryBuffers
=
1
;
TRACE
(
"caps=0x%X
\n
"
,(
unsigned
int
)
pCaps
->
dwFlags
);
pCaps
->
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
pCaps
->
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
/* the other fields only apply to secondary buffers, which we don't support
* (unless we want to mess with wavetable synthesizers and MIDI) */
...
...
dlls/winmm/wineaudioio/audio.c
View file @
7d43d7bb
...
...
@@ -1562,6 +1562,8 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap
pCaps
->
dwFlags
=
DSCAPS_PRIMARYMONO
|
DSCAPS_PRIMARYSTEREO
|
DSCAPS_PRIMARY8BIT
|
DSCAPS_PRIMARY16BIT
;
pCaps
->
dwPrimaryBuffers
=
1
;
pCaps
->
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
pCaps
->
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
/* the other fields only apply to secondary buffers, which we don't support
* (unless we want to mess with wavetable synthesizers and MIDI) */
return
DS_OK
;
...
...
dlls/winmm/wineoss/audio.c
View file @
7d43d7bb
...
...
@@ -553,7 +553,9 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
/* direct sound caps */
ossdev
->
ds_caps
.
dwFlags
=
0
;
ossdev
->
ds_caps
.
dwPrimaryBuffers
=
1
;
ossdev
->
ds_caps
.
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
ossdev
->
ds_caps
.
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
if
(
WINE_TRACE_ON
(
wave
))
{
/* Note that this only reports the formats supported by the hardware.
* The driver may support other formats and do the conversions in
...
...
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