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
96c514bd
Commit
96c514bd
authored
Aug 18, 2001
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced memset by hand made equivalent to work around some buggy
memset implementations.
parent
63609175
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
audio.c
dlls/winmm/wineoss/audio.c
+26
-2
No files found.
dlls/winmm/wineoss/audio.c
View file @
96c514bd
...
...
@@ -1322,8 +1322,32 @@ static HRESULT DSDB_MapPrimary(IDsDriverBufferImpl *dsdb)
}
TRACE
(
"(%p): sound device has been mapped for direct access at %p, size=%ld
\n
"
,
dsdb
,
wwo
->
mapping
,
wwo
->
maplen
);
/* for some reason, es1371 and sblive! sometimes have junk in here. */
memset
(
wwo
->
mapping
,
0
,
wwo
->
maplen
);
/* clear it, or we get junk noise */
/* for some reason, es1371 and sblive! sometimes have junk in here.
* clear it, or we get junk noise */
/* some libc implementations are buggy: their memset reads from the buffer...
* to work around it, we have the 0 the block by hand and do not call:
* memset(wwo->mapping,0,wwo->maplen);
*/
{
char
*
p1
=
wwo
->
mapping
;
unsigned
len
=
wwo
->
maplen
;
if
(
len
>=
16
)
/* so we can have at least a 4 longs to store... */
{
/* the mmap:ed value is (at least) dword aligned
* so, start filling the complete unsigned long:s
*/
int
b
=
len
>>
2
;
unsigned
long
*
p4
=
(
unsigned
long
*
)
p1
;
while
(
b
--
)
*
p4
++
=
0
;
/* prepare for filling the rest */
len
&=
3
;
p1
=
(
unsigned
char
*
)
p4
;
}
/* in all cases, fill the remaining bytes */
while
(
len
--
!=
0
)
*
p1
++
=
0
;
}
}
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