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
d6f746de
Commit
d6f746de
authored
Oct 30, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Oct 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache the wave volume so it can be returned rather than the OSS
derived value when possible.
parent
c854f9eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
audio.c
dlls/winmm/wineoss/audio.c
+14
-1
No files found.
dlls/winmm/wineoss/audio.c
View file @
d6f746de
...
...
@@ -179,6 +179,7 @@ typedef struct {
WAVEOPENDESC
waveDesc
;
WORD
wFlags
;
PCMWAVEFORMAT
format
;
DWORD
volume
;
/* OSS information */
DWORD
dwFragmentSize
;
/* size of OSS buffer fragment */
...
...
@@ -831,6 +832,7 @@ LONG OSS_WaveInit(void)
{
WOutDev
[
numOutDev
].
state
=
WINE_WS_CLOSED
;
WOutDev
[
numOutDev
].
ossdev
=
&
OSS_Devices
[
i
];
WOutDev
[
numOutDev
].
volume
=
0xffffffff
;
numOutDev
++
;
}
}
...
...
@@ -1876,6 +1878,7 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
int
mixer
;
int
volume
;
DWORD
left
,
right
;
DWORD
last_left
,
last_right
;
TRACE
(
"(%u, %p);
\n
"
,
wDevID
,
lpdwVol
);
...
...
@@ -1896,7 +1899,13 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
left
=
LOBYTE
(
volume
);
right
=
HIBYTE
(
volume
);
TRACE
(
"left=%ld right=%ld !
\n
"
,
left
,
right
);
*
lpdwVol
=
((
left
*
0xFFFFl
)
/
100
)
+
(((
right
*
0xFFFFl
)
/
100
)
<<
16
);
last_left
=
(
LOWORD
(
WOutDev
[
wDevID
].
volume
)
*
100
)
/
0xFFFFl
;
last_right
=
(
HIWORD
(
WOutDev
[
wDevID
].
volume
)
*
100
)
/
0xFFFFl
;
TRACE
(
"last_left=%ld last_right=%ld !
\n
"
,
last_left
,
last_right
);
if
(
last_left
==
left
&&
last_right
==
right
)
*
lpdwVol
=
WOutDev
[
wDevID
].
volume
;
else
*
lpdwVol
=
((
left
*
0xFFFFl
)
/
100
)
+
(((
right
*
0xFFFFl
)
/
100
)
<<
16
);
return
MMSYSERR_NOERROR
;
}
...
...
@@ -1931,6 +1940,10 @@ static DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
TRACE
(
"volume=%04x
\n
"
,
(
unsigned
)
volume
);
}
close
(
mixer
);
/* save requested volume */
WOutDev
[
wDevID
].
volume
=
dwParam
;
return
MMSYSERR_NOERROR
;
}
...
...
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