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
f1565973
Commit
f1565973
authored
Mar 21, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Mar 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix direct sound capabilities to match hardware.
parent
95c90f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
21 deletions
+37
-21
audio.c
dlls/winmm/winealsa/audio.c
+37
-21
No files found.
dlls/winmm/winealsa/audio.c
View file @
f1565973
...
...
@@ -188,6 +188,7 @@ typedef struct {
/* DirectSound stuff */
DSDRIVERDESC
ds_desc
;
DSDRIVERCAPS
ds_caps
;
}
WINE_WAVEOUT
;
typedef
struct
{
...
...
@@ -234,6 +235,7 @@ typedef struct {
/* DirectSound stuff */
DSDRIVERDESC
ds_desc
;
DSCDRIVERCAPS
ds_caps
;
}
WINE_WAVEIN
;
static
WINE_WAVEOUT
WOutDev
[
MAX_WAVEOUTDRV
];
...
...
@@ -868,6 +870,38 @@ LONG ALSA_WaveInit(void)
wwo
->
caps
.
dwSupport
|=
WAVECAPS_LRVOLUME
;
}
if
(
wwo
->
caps
.
dwFormats
&
(
WAVE_FORMAT_1M08
|
WAVE_FORMAT_2M08
|
WAVE_FORMAT_4M08
|
WAVE_FORMAT_48M08
|
WAVE_FORMAT_96M08
|
WAVE_FORMAT_1M16
|
WAVE_FORMAT_2M16
|
WAVE_FORMAT_4M16
|
WAVE_FORMAT_48M16
|
WAVE_FORMAT_96M16
)
)
wwo
->
ds_caps
.
dwFlags
|=
DSCAPS_PRIMARYMONO
;
if
(
wwo
->
caps
.
dwFormats
&
(
WAVE_FORMAT_1S08
|
WAVE_FORMAT_2S08
|
WAVE_FORMAT_4S08
|
WAVE_FORMAT_48S08
|
WAVE_FORMAT_96S08
|
WAVE_FORMAT_1S16
|
WAVE_FORMAT_2S16
|
WAVE_FORMAT_4S16
|
WAVE_FORMAT_48S16
|
WAVE_FORMAT_96S16
)
)
wwo
->
ds_caps
.
dwFlags
|=
DSCAPS_PRIMARYSTEREO
;
if
(
wwo
->
caps
.
dwFormats
&
(
WAVE_FORMAT_1M08
|
WAVE_FORMAT_2M08
|
WAVE_FORMAT_4M08
|
WAVE_FORMAT_48M08
|
WAVE_FORMAT_96M08
|
WAVE_FORMAT_1S08
|
WAVE_FORMAT_2S08
|
WAVE_FORMAT_4S08
|
WAVE_FORMAT_48S08
|
WAVE_FORMAT_96S08
)
)
wwo
->
ds_caps
.
dwFlags
|=
DSCAPS_PRIMARY8BIT
;
if
(
wwo
->
caps
.
dwFormats
&
(
WAVE_FORMAT_1M16
|
WAVE_FORMAT_2M16
|
WAVE_FORMAT_4M16
|
WAVE_FORMAT_48M16
|
WAVE_FORMAT_96M16
|
WAVE_FORMAT_1S16
|
WAVE_FORMAT_2S16
|
WAVE_FORMAT_4S16
|
WAVE_FORMAT_48S16
|
WAVE_FORMAT_96S16
)
)
wwo
->
ds_caps
.
dwFlags
|=
DSCAPS_PRIMARY16BIT
;
wwo
->
ds_caps
.
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
wwo
->
ds_caps
.
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
wwo
->
ds_caps
.
dwPrimaryBuffers
=
1
;
ALSA_WodNumDevs
++
;
}
...
...
@@ -984,7 +1018,7 @@ LONG ALSA_WaveInit(void)
ALSA_WidNumDevs
++
;
}
return
0
;
}
...
...
@@ -2064,7 +2098,7 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
if
(
!
wwo
->
ctl
)
return
MMSYSERR_NOTSUPPORTED
;
count
=
snd_ctl_elem_info_get_count
(
wwo
->
playback_einfo
);
min
=
snd_ctl_elem_info_get_min
(
wwo
->
playback_einfo
);
max
=
snd_ctl_elem_info_get_max
(
wwo
->
playback_einfo
);
...
...
@@ -2663,25 +2697,7 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap
{
IDsDriverImpl
*
This
=
(
IDsDriverImpl
*
)
iface
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pCaps
);
memset
(
pCaps
,
0
,
sizeof
(
*
pCaps
));
pCaps
->
dwFlags
=
DSCAPS_PRIMARYMONO
;
if
(
WOutDev
[
This
->
wDevID
].
caps
.
wChannels
==
2
)
pCaps
->
dwFlags
|=
DSCAPS_PRIMARYSTEREO
;
if
(
WOutDev
[
This
->
wDevID
].
caps
.
dwFormats
&
(
WAVE_FORMAT_1S08
|
WAVE_FORMAT_2S08
|
WAVE_FORMAT_4S08
)
)
pCaps
->
dwFlags
|=
DSCAPS_PRIMARY8BIT
;
if
(
WOutDev
[
This
->
wDevID
].
caps
.
dwFormats
&
(
WAVE_FORMAT_1S16
|
WAVE_FORMAT_2S16
|
WAVE_FORMAT_4S16
))
pCaps
->
dwFlags
|=
DSCAPS_PRIMARY16BIT
;
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) */
memcpy
(
pCaps
,
&
(
WOutDev
[
This
->
wDevID
].
ds_caps
),
sizeof
(
DSDRIVERCAPS
));
return
DS_OK
;
}
...
...
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