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
112cf22a
Commit
112cf22a
authored
Jan 07, 2003
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always open the device in the default 22050x8x2 format, and let it
report the actual device format to us.
parent
772cabeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
21 deletions
+10
-21
dsound_main.c
dlls/dsound/dsound_main.c
+10
-21
No files found.
dlls/dsound/dsound_main.c
View file @
112cf22a
...
@@ -571,7 +571,6 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
...
@@ -571,7 +571,6 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
{
{
IDirectSoundImpl
**
ippDS
=
(
IDirectSoundImpl
**
)
ppDS
;
IDirectSoundImpl
**
ippDS
=
(
IDirectSoundImpl
**
)
ppDS
;
PIDSDRIVER
drv
=
NULL
;
PIDSDRIVER
drv
=
NULL
;
WAVEOUTCAPSA
wcaps
;
unsigned
wod
,
wodn
;
unsigned
wod
,
wodn
;
HRESULT
err
=
DS_OK
;
HRESULT
err
=
DS_OK
;
...
@@ -599,8 +598,6 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
...
@@ -599,8 +598,6 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
/* FIXME: How do we find the GUID of an audio device? */
/* FIXME: How do we find the GUID of an audio device? */
wod
=
0
;
/* start at the first audio device */
wod
=
0
;
/* start at the first audio device */
/* Get output device caps */
waveOutGetDevCapsA
(
wod
,
&
wcaps
,
sizeof
(
wcaps
));
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
);
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
);
...
@@ -638,23 +635,15 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
...
@@ -638,23 +635,15 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
/* Set default wave format (may need it for waveOutOpen) */
/* Set default wave format (may need it for waveOutOpen) */
(
*
ippDS
)
->
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
(
*
ippDS
)
->
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
/* default to stereo, if the sound card can do it */
/* We rely on the sound driver to return the actual sound format of
if
(
wcaps
.
wChannels
>
1
)
* the device if it does not support 22050x8x2 and is given the
(
*
ippDS
)
->
wfx
.
nChannels
=
2
;
* WAVE_DIRECTSOUND flag.
else
*/
(
*
ippDS
)
->
wfx
.
nChannels
=
1
;
(
*
ippDS
)
->
wfx
.
nSamplesPerSec
=
22050
;
/* default to 8, if the sound card can do it */
(
*
ippDS
)
->
wfx
.
wBitsPerSample
=
8
;
if
(
wcaps
.
dwFormats
&
(
WAVE_FORMAT_4M08
|
WAVE_FORMAT_2M08
|
WAVE_FORMAT_1M08
|
(
*
ippDS
)
->
wfx
.
nChannels
=
2
;
WAVE_FORMAT_4S08
|
WAVE_FORMAT_2S08
|
WAVE_FORMAT_1S08
))
{
(
*
ippDS
)
->
wfx
.
nBlockAlign
=
(
*
ippDS
)
->
wfx
.
wBitsPerSample
*
(
*
ippDS
)
->
wfx
.
nChannels
/
8
;
(
*
ippDS
)
->
wfx
.
wBitsPerSample
=
8
;
(
*
ippDS
)
->
wfx
.
nAvgBytesPerSec
=
(
*
ippDS
)
->
wfx
.
nSamplesPerSec
*
(
*
ippDS
)
->
wfx
.
nBlockAlign
;
(
*
ippDS
)
->
wfx
.
nBlockAlign
=
1
*
(
*
ippDS
)
->
wfx
.
nChannels
;
}
else
{
/* it's probably a 16-bit-only card */
(
*
ippDS
)
->
wfx
.
wBitsPerSample
=
16
;
(
*
ippDS
)
->
wfx
.
nBlockAlign
=
2
*
(
*
ippDS
)
->
wfx
.
nChannels
;
}
(
*
ippDS
)
->
wfx
.
nSamplesPerSec
=
22050
;
(
*
ippDS
)
->
wfx
.
nAvgBytesPerSec
=
22050
*
(
*
ippDS
)
->
wfx
.
nBlockAlign
;
/* If the driver requests being opened through MMSYSTEM
/* If the driver requests being opened through MMSYSTEM
* (which is recommended by the DDK), it is supposed to happen
* (which is recommended by the DDK), it is supposed to happen
...
@@ -695,7 +684,7 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
...
@@ -695,7 +684,7 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
}
else
{
}
else
{
unsigned
c
;
unsigned
c
;
/* FIXME:
look at wcap
s */
/* FIXME:
We should check the device capabilitie
s */
(
*
ippDS
)
->
drvcaps
.
dwFlags
=
(
*
ippDS
)
->
drvcaps
.
dwFlags
=
DSCAPS_PRIMARY16BIT
|
DSCAPS_PRIMARYSTEREO
;
DSCAPS_PRIMARY16BIT
|
DSCAPS_PRIMARYSTEREO
;
if
(
ds_emuldriver
)
if
(
ds_emuldriver
)
...
...
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