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
4774477b
Commit
4774477b
authored
Sep 29, 2002
by
Ove Kaaven
Committed by
Alexandre Julliard
Sep 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for soundcards that can't do 8-bit audio, only 16-bit (also
checked for soundcards that can't do stereo while I was at it).
parent
92810b90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
dsound_main.c
dlls/dsound/dsound_main.c
+16
-4
No files found.
dlls/dsound/dsound_main.c
View file @
4774477b
...
...
@@ -641,11 +641,23 @@ HRESULT WINAPI DirectSoundCreate8(REFGUID lpGUID,LPDIRECTSOUND8 *ppDS,IUnknown *
/* Set default wave format (may need it for waveOutOpen) */
(
*
ippDS
)
->
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
(
*
ippDS
)
->
wfx
.
nChannels
=
2
;
/* default to stereo, if the sound card can do it */
if
(
wcaps
.
wChannels
>
1
)
(
*
ippDS
)
->
wfx
.
nChannels
=
2
;
else
(
*
ippDS
)
->
wfx
.
nChannels
=
1
;
/* default to 8, if the sound card can do it */
if
(
wcaps
.
dwFormats
&
(
WAVE_FORMAT_4M08
|
WAVE_FORMAT_2M08
|
WAVE_FORMAT_1M08
|
WAVE_FORMAT_4S08
|
WAVE_FORMAT_2S08
|
WAVE_FORMAT_1S08
))
{
(
*
ippDS
)
->
wfx
.
wBitsPerSample
=
8
;
(
*
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
=
44100
;
(
*
ippDS
)
->
wfx
.
nBlockAlign
=
2
;
(
*
ippDS
)
->
wfx
.
wBitsPerSample
=
8
;
(
*
ippDS
)
->
wfx
.
nAvgBytesPerSec
=
22050
*
(
*
ippDS
)
->
wfx
.
nBlockAlign
;
/* If the driver requests being opened through MMSYSTEM
* (which is recommended by the DDK), it is supposed to happen
...
...
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