Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2cf28070
Commit
2cf28070
authored
Dec 31, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Jan 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Remove unneeded casts.
parent
a5195512
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
capture.c
dlls/dsound/capture.c
+3
-3
dsound.c
dlls/dsound/dsound.c
+3
-3
mixer.c
dlls/dsound/mixer.c
+3
-3
No files found.
dlls/dsound/capture.c
View file @
2cf28070
...
...
@@ -376,7 +376,7 @@ DirectSoundCaptureEnumerateW(
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvname
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
if
(
lpDSEnumCallback
(
(
LPGUID
)
&
DSOUND_capture_guids
[
wid
],
wDesc
,
wName
,
lpContext
)
==
FALSE
)
if
(
lpDSEnumCallback
(
&
DSOUND_capture_guids
[
wid
],
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
}
...
...
@@ -418,7 +418,7 @@ DSOUND_capture_callback(
DWORD
dw2
)
{
DirectSoundCaptureDevice
*
This
=
(
DirectSoundCaptureDevice
*
)
dwUser
;
IDirectSoundCaptureBufferImpl
*
Moi
=
(
IDirectSoundCaptureBufferImpl
*
)
This
->
capture_buffer
;
IDirectSoundCaptureBufferImpl
*
Moi
=
This
->
capture_buffer
;
TRACE
(
"(%p,%08x(%s),%08x,%08x,%08x) entering at %d
\n
"
,
hwi
,
msg
,
msg
==
MM_WIM_OPEN
?
"MM_WIM_OPEN"
:
msg
==
MM_WIM_CLOSE
?
"MM_WIM_CLOSE"
:
msg
==
MM_WIM_DATA
?
"MM_WIM_DATA"
:
"UNKNOWN"
,
dwUser
,
dw1
,
dw2
,
GetTickCount
());
...
...
@@ -1388,7 +1388,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
HRESULT
err
=
DS_OK
;
LPBYTE
newbuf
;
DWORD
buflen
;
IDirectSoundCaptureBufferImpl
*
This
=
(
IDirectSoundCaptureBufferImpl
*
)
*
ppobj
;
IDirectSoundCaptureBufferImpl
*
This
=
*
ppobj
;
This
->
ref
=
1
;
This
->
device
=
device
;
...
...
dlls/dsound/dsound.c
View file @
2cf28070
...
...
@@ -1560,7 +1560,7 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
if
(
device
->
hwbuf
)
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
else
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
hres
=
PrimaryBufferImpl_Create
(
device
,
(
PrimaryBufferImpl
**
)
&
(
device
->
primary
),
&
(
device
->
dsbd
));
hres
=
PrimaryBufferImpl_Create
(
device
,
&
(
device
->
primary
),
&
(
device
->
dsbd
));
if
(
device
->
primary
)
{
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)(
device
->
primary
));
*
ppdsb
=
(
LPDIRECTSOUNDBUFFER
)(
device
->
primary
);
...
...
@@ -1628,12 +1628,12 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
return
DSERR_INVALIDPARAM
;
}
hres
=
IDirectSoundBufferImpl_Create
(
device
,
(
IDirectSoundBufferImpl
**
)
&
dsb
,
dsbd
);
hres
=
IDirectSoundBufferImpl_Create
(
device
,
&
dsb
,
dsbd
);
if
(
dsb
)
{
hres
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
ppdsb
);
if
(
*
ppdsb
)
{
dsb
->
secondary
=
(
SecondaryBufferImpl
*
)
*
ppdsb
;
IDirectSoundBuffer_AddRef
(
(
LPDIRECTSOUNDBUFFER
)
*
ppdsb
);
IDirectSoundBuffer_AddRef
(
*
ppdsb
);
}
else
WARN
(
"SecondaryBufferImpl_Create failed
\n
"
);
}
else
...
...
dlls/dsound/mixer.c
View file @
2cf28070
...
...
@@ -445,11 +445,11 @@ static LPBYTE DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, DWORD writepos,
/* 8-bit WAV is unsigned, but we need to operate */
/* on signed data for this to work properly */
for
(
i
=
0
;
i
<
len
;
i
+=
2
)
{
*
(
bpc
++
)
=
(((
INT
)(
*
(
mem
++
)
-
128
)
*
vLeft
)
>>
16
)
+
128
;
*
(
bpc
++
)
=
(((
INT
)(
*
(
mem
++
)
-
128
)
*
vRight
)
>>
16
)
+
128
;
*
(
bpc
++
)
=
(((
*
(
mem
++
)
-
128
)
*
vLeft
)
>>
16
)
+
128
;
*
(
bpc
++
)
=
(((
*
(
mem
++
)
-
128
)
*
vRight
)
>>
16
)
+
128
;
}
if
(
len
%
2
==
1
&&
nChannels
==
1
)
*
(
bpc
++
)
=
(((
INT
)(
*
(
mem
++
)
-
128
)
*
vLeft
)
>>
16
)
+
128
;
*
(
bpc
++
)
=
(((
*
(
mem
++
)
-
128
)
*
vLeft
)
>>
16
)
+
128
;
break
;
case
16
:
/* 16-bit WAV is signed -- much better */
...
...
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