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
6f9d4167
Commit
6f9d4167
authored
Sep 10, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Sep 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return error from low level driver when necessary.
parent
241a4c34
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
buffer.c
dlls/dsound/buffer.c
+7
-8
primary.c
dlls/dsound/primary.c
+3
-4
No files found.
dlls/dsound/buffer.c
View file @
6f9d4167
...
...
@@ -207,6 +207,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
LONG
oldVol
;
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%ld)
\n
"
,
This
,
vol
);
...
...
@@ -235,7 +236,6 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(
if
(
vol
!=
oldVol
)
{
if
(
This
->
hwbuf
)
{
HRESULT
hres
;
hres
=
IDsDriverBuffer_SetVolumePan
(
This
->
hwbuf
,
&
(
This
->
volpan
));
if
(
hres
!=
DS_OK
)
WARN
(
"IDsDriverBuffer_SetVolumePan failed
\n
"
);
...
...
@@ -246,7 +246,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(
LeaveCriticalSection
(
&
(
This
->
lock
));
/* **** */
return
DS_OK
;
return
hres
;
}
static
HRESULT
WINAPI
IDirectSoundBufferImpl_GetVolume
(
...
...
@@ -795,6 +795,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
)
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSoundBufferImpl
*
)
iface
;
DWORD
probably_valid_to
;
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%p,%ld,%p,%ld)
\n
"
,
This
,
p1
,
x1
,
p2
,
x2
);
...
...
@@ -802,15 +803,12 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
EnterCriticalSection
(
&
(
This
->
lock
));
if
(
!
(
This
->
dsound
->
drvdesc
.
dwFlags
&
DSDDESC_DONTNEEDSECONDARYLOCK
)
&&
This
->
hwbuf
)
{
HRESULT
hres
;
hres
=
IDsDriverBuffer_Unlock
(
This
->
hwbuf
,
p1
,
x1
,
p2
,
x2
);
if
(
hres
!=
DS_OK
)
{
LeaveCriticalSection
(
&
(
This
->
lock
));
if
(
hres
!=
DS_OK
)
WARN
(
"IDsDriverBuffer_Unlock failed
\n
"
);
return
hres
;
}
}
if
(
hres
==
DS_OK
)
{
if
(
p2
)
probably_valid_to
=
(((
LPBYTE
)
p2
)
-
This
->
buffer
->
memory
)
+
x2
;
else
probably_valid_to
=
(((
LPBYTE
)
p1
)
-
This
->
buffer
->
memory
)
+
x1
;
probably_valid_to
%=
This
->
buflen
;
...
...
@@ -820,12 +818,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
/* see IDirectSoundBufferImpl_Lock */
probably_valid_to
=
(
DWORD
)
-
1
;
This
->
probably_valid_to
=
probably_valid_to
;
}
LeaveCriticalSection
(
&
(
This
->
lock
));
/* **** */
TRACE
(
"probably_valid_to=%ld
\n
"
,
This
->
probably_valid_to
);
return
DS_OK
;
return
hres
;
}
static
HRESULT
WINAPI
IDirectSoundBufferImpl_Restore
(
...
...
dlls/dsound/primary.c
View file @
6f9d4167
...
...
@@ -775,7 +775,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
IDirectSoundImpl
*
dsound
=
This
->
dsound
;
DWORD
ampfactors
;
DSVOLUMEPAN
volpan
;
HRESULT
hres
;
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%ld)
\n
"
,
This
,
pan
);
...
...
@@ -803,8 +803,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
hres
=
IDsDriverBuffer_SetVolumePan
(
dsound
->
hwbuf
,
&
volpan
);
if
(
hres
!=
DS_OK
)
WARN
(
"IDsDriverBuffer_SetVolumePan failed
\n
"
);
}
else
{
}
else
{
ampfactors
=
(
volpan
.
dwTotalLeftAmpFactor
&
0xffff
)
|
(
volpan
.
dwTotalRightAmpFactor
<<
16
);
waveOutSetVolume
(
dsound
->
hwo
,
ampfactors
);
}
...
...
@@ -813,7 +812,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
LeaveCriticalSection
(
&
(
dsound
->
mixlock
));
/* **** */
return
DS_OK
;
return
hres
;
}
static
HRESULT
WINAPI
PrimaryBufferImpl_GetPan
(
...
...
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