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
20547de0
Commit
20547de0
authored
Apr 09, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Apr 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch the fragment size if it does not match the current sound
format. This saves us from triggering a kernel freeze on some OSS 2.4 + SoundBlaster 16 systems.
parent
e7427e13
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
audio.c
dlls/winmm/wineoss/audio.c
+12
-5
No files found.
dlls/winmm/wineoss/audio.c
View file @
20547de0
...
...
@@ -1780,6 +1780,18 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
wwo
->
dwWrittenTotal
=
0
;
wwo
->
bNeedPost
=
TRUE
;
TRACE
(
"fd=%d fragstotal=%d fragsize=%d BufferSize=%ld
\n
"
,
wwo
->
ossdev
->
fd
,
info
.
fragstotal
,
info
.
fragsize
,
wwo
->
dwBufferSize
);
if
(
wwo
->
dwFragmentSize
%
wwo
->
format
.
wf
.
nBlockAlign
)
{
ERR
(
"Fragment doesn't contain an integral number of data blocks fragsize=%ld BlockAlign=%d
\n
"
,
wwo
->
dwFragmentSize
,
wwo
->
format
.
wf
.
nBlockAlign
);
/* Some SoundBlaster 16 cards return an incorrect (odd) fragment
* size for 16 bit sound. This will cause a system crash when we try
* to write just the specified odd number of bytes. So if we
* detect something is wrong we'd better fix it.
*/
wwo
->
dwFragmentSize
-=
wwo
->
dwFragmentSize
%
wwo
->
format
.
wf
.
nBlockAlign
;
}
OSS_InitRingMessage
(
&
wwo
->
msgRing
);
wwo
->
hStartUpEvent
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
@@ -1788,11 +1800,6 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
CloseHandle
(
wwo
->
hStartUpEvent
);
wwo
->
hStartUpEvent
=
INVALID_HANDLE_VALUE
;
TRACE
(
"fd=%d fragmentSize=%ld
\n
"
,
wwo
->
ossdev
->
fd
,
wwo
->
dwFragmentSize
);
if
(
wwo
->
dwFragmentSize
%
wwo
->
format
.
wf
.
nBlockAlign
)
ERR
(
"Fragment doesn't contain an integral number of data blocks
\n
"
);
TRACE
(
"wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!
\n
"
,
wwo
->
format
.
wBitsPerSample
,
wwo
->
format
.
wf
.
nAvgBytesPerSec
,
wwo
->
format
.
wf
.
nSamplesPerSec
,
wwo
->
format
.
wf
.
nChannels
,
...
...
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