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
15323580
Commit
15323580
authored
Nov 03, 2015
by
Andrew Eikum
Committed by
Alexandre Julliard
Nov 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: In Shared mode, track device position in bytes.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8ed553c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+9
-2
No files found.
dlls/winepulse.drv/mmdevdrv.c
View file @
15323580
...
@@ -2207,8 +2207,12 @@ static HRESULT WINAPI AudioClock_GetFrequency(IAudioClock *iface, UINT64 *freq)
...
@@ -2207,8 +2207,12 @@ static HRESULT WINAPI AudioClock_GetFrequency(IAudioClock *iface, UINT64 *freq)
pthread_mutex_lock
(
&
pulse_lock
);
pthread_mutex_lock
(
&
pulse_lock
);
hr
=
pulse_stream_valid
(
This
);
hr
=
pulse_stream_valid
(
This
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
if
(
This
->
share
==
AUDCLNT_SHAREMODE_SHARED
)
*
freq
=
This
->
ss
.
rate
*
pa_frame_size
(
&
This
->
ss
);
*
freq
=
This
->
ss
.
rate
*
pa_frame_size
(
&
This
->
ss
);
else
*
freq
=
This
->
ss
.
rate
;
}
pthread_mutex_unlock
(
&
pulse_lock
);
pthread_mutex_unlock
(
&
pulse_lock
);
return
hr
;
return
hr
;
}
}
...
@@ -2233,6 +2237,9 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
...
@@ -2233,6 +2237,9 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
*
pos
=
This
->
clock_written
;
*
pos
=
This
->
clock_written
;
if
(
This
->
share
==
AUDCLNT_SHAREMODE_EXCLUSIVE
)
*
pos
/=
pa_frame_size
(
&
This
->
ss
);
/* Make time never go backwards */
/* Make time never go backwards */
if
(
*
pos
<
This
->
clock_lastpos
)
if
(
*
pos
<
This
->
clock_lastpos
)
*
pos
=
This
->
clock_lastpos
;
*
pos
=
This
->
clock_lastpos
;
...
@@ -2301,7 +2308,7 @@ static HRESULT WINAPI AudioClock2_GetDevicePosition(IAudioClock2 *iface,
...
@@ -2301,7 +2308,7 @@ static HRESULT WINAPI AudioClock2_GetDevicePosition(IAudioClock2 *iface,
{
{
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
HRESULT
hr
=
AudioClock_GetPosition
(
&
This
->
IAudioClock_iface
,
pos
,
qpctime
);
HRESULT
hr
=
AudioClock_GetPosition
(
&
This
->
IAudioClock_iface
,
pos
,
qpctime
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
)
&&
This
->
share
==
AUDCLNT_SHAREMODE_SHARED
)
*
pos
/=
pa_frame_size
(
&
This
->
ss
);
*
pos
/=
pa_frame_size
(
&
This
->
ss
);
return
hr
;
return
hr
;
}
}
...
...
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