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
096fb434
Commit
096fb434
authored
Jun 17, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Set AudioQueue volume, not AudioDevice volume.
We want to control the volume for each particular stream, not the entire system-wide device.
parent
792060d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+4
-8
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
096fb434
...
...
@@ -2289,7 +2289,6 @@ static const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl =
/* index == -1 means set all channels, otherwise sets only the given channel */
static
HRESULT
ca_setvol
(
ACImpl
*
This
,
UINT32
index
)
{
AudioObjectPropertyAddress
addr
;
float
level
;
OSStatus
sc
;
...
...
@@ -2308,14 +2307,9 @@ static HRESULT ca_setvol(ACImpl *This, UINT32 index)
level
=
This
->
session
->
master_vol
*
This
->
session
->
channel_vols
[
index
]
*
This
->
vols
[
index
];
addr
.
mScope
=
This
->
scope
;
addr
.
mSelector
=
kAudioDevicePropertyVolumeScalar
;
addr
.
mElement
=
index
+
1
;
sc
=
AudioObjectSetPropertyData
(
This
->
adevid
,
&
addr
,
0
,
NULL
,
sizeof
(
float
),
&
level
);
sc
=
AudioQueueSetParameter
(
This
->
aqueue
,
kAudioQueueParam_Volume
,
level
);
if
(
sc
!=
noErr
){
WARN
(
"Setting _Volume
Scalar
property failed: %lx
\n
"
,
sc
);
WARN
(
"Setting _Volume property failed: %lx
\n
"
,
sc
);
return
E_FAIL
;
}
...
...
@@ -2514,6 +2508,7 @@ static HRESULT WINAPI AudioStreamVolume_SetChannelVolume(
This
->
vols
[
index
]
=
level
;
WARN
(
"AudioQueue doesn't support per-channel volume control
\n
"
);
ret
=
ca_setvol
(
This
,
index
);
OSSpinLockUnlock
(
&
This
->
lock
);
...
...
@@ -2675,6 +2670,7 @@ static HRESULT WINAPI ChannelAudioVolume_SetChannelVolume(
session
->
channel_vols
[
index
]
=
level
;
WARN
(
"AudioQueue doesn't support per-channel volume control
\n
"
);
ret
=
ca_session_setvol
(
session
,
index
);
LeaveCriticalSection
(
&
session
->
lock
);
...
...
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