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
e50946f0
Commit
e50946f0
authored
May 12, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
May 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Use mmdevapi's AudioClock.
parent
352d493e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
146 deletions
+8
-146
alsa.c
dlls/winealsa.drv/alsa.c
+6
-0
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+2
-146
No files found.
dlls/winealsa.drv/alsa.c
View file @
e50946f0
...
...
@@ -2177,6 +2177,12 @@ static NTSTATUS alsa_get_position(void *args)
UINT64
position
;
snd_pcm_state_t
alsa_state
;
if
(
params
->
device
)
{
FIXME
(
"Device position reporting not implemented
\n
"
);
params
->
result
=
E_NOTIMPL
;
return
STATUS_SUCCESS
;
}
alsa_lock
(
stream
);
/* avail_update required to get accurate snd_pcm_state() */
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
e50946f0
...
...
@@ -74,8 +74,8 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl;
static
const
IAudioCaptureClientVtbl
AudioCaptureClient_Vtbl
;
extern
const
IAudioSessionControl2Vtbl
AudioSessionControl2_Vtbl
;
extern
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
;
static
const
IAudioClockVtbl
AudioClock_Vtbl
;
static
const
IAudioClock2Vtbl
AudioClock2_Vtbl
;
extern
const
IAudioClockVtbl
AudioClock_Vtbl
;
extern
const
IAudioClock2Vtbl
AudioClock2_Vtbl
;
extern
const
IAudioStreamVolumeVtbl
AudioStreamVolume_Vtbl
;
extern
const
IChannelAudioVolumeVtbl
ChannelAudioVolume_Vtbl
;
...
...
@@ -106,16 +106,6 @@ static inline ACImpl *impl_from_IAudioCaptureClient(IAudioCaptureClient *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioCaptureClient_iface
);
}
static
inline
ACImpl
*
impl_from_IAudioClock
(
IAudioClock
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioClock_iface
);
}
static
inline
ACImpl
*
impl_from_IAudioClock2
(
IAudioClock2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioClock2_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
{
switch
(
reason
)
...
...
@@ -1337,140 +1327,6 @@ static const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
AudioCaptureClient_GetNextPacketSize
};
static
HRESULT
WINAPI
AudioClock_QueryInterface
(
IAudioClock
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioClock
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioClock2
))
*
ppv
=
&
This
->
IAudioClock2_iface
;
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"Unknown interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
AudioClock_AddRef
(
IAudioClock
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
return
IAudioClient3_AddRef
(
&
This
->
IAudioClient3_iface
);
}
static
ULONG
WINAPI
AudioClock_Release
(
IAudioClock
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
return
IAudioClient3_Release
(
&
This
->
IAudioClient3_iface
);
}
static
HRESULT
WINAPI
AudioClock_GetFrequency
(
IAudioClock
*
iface
,
UINT64
*
freq
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
struct
get_frequency_params
params
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
freq
);
params
.
stream
=
This
->
stream
;
params
.
freq
=
freq
;
ALSA_CALL
(
get_frequency
,
&
params
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClock_GetPosition
(
IAudioClock
*
iface
,
UINT64
*
pos
,
UINT64
*
qpctime
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
struct
get_position_params
params
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
pos
,
qpctime
);
if
(
!
pos
)
return
E_POINTER
;
params
.
stream
=
This
->
stream
;
params
.
device
=
FALSE
;
params
.
pos
=
pos
;
params
.
qpctime
=
qpctime
;
ALSA_CALL
(
get_position
,
&
params
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClock_GetCharacteristics
(
IAudioClock
*
iface
,
DWORD
*
chars
)
{
ACImpl
*
This
=
impl_from_IAudioClock
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
chars
);
if
(
!
chars
)
return
E_POINTER
;
*
chars
=
AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ
;
return
S_OK
;
}
static
const
IAudioClockVtbl
AudioClock_Vtbl
=
{
AudioClock_QueryInterface
,
AudioClock_AddRef
,
AudioClock_Release
,
AudioClock_GetFrequency
,
AudioClock_GetPosition
,
AudioClock_GetCharacteristics
};
static
HRESULT
WINAPI
AudioClock2_QueryInterface
(
IAudioClock2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
return
IAudioClock_QueryInterface
(
&
This
->
IAudioClock_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
AudioClock2_AddRef
(
IAudioClock2
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
return
IAudioClient3_AddRef
(
&
This
->
IAudioClient3_iface
);
}
static
ULONG
WINAPI
AudioClock2_Release
(
IAudioClock2
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
return
IAudioClient3_Release
(
&
This
->
IAudioClient3_iface
);
}
static
HRESULT
WINAPI
AudioClock2_GetDevicePosition
(
IAudioClock2
*
iface
,
UINT64
*
pos
,
UINT64
*
qpctime
)
{
ACImpl
*
This
=
impl_from_IAudioClock2
(
iface
);
FIXME
(
"(%p)->(%p, %p)
\n
"
,
This
,
pos
,
qpctime
);
return
E_NOTIMPL
;
}
static
const
IAudioClock2Vtbl
AudioClock2_Vtbl
=
{
AudioClock2_QueryInterface
,
AudioClock2_AddRef
,
AudioClock2_Release
,
AudioClock2_GetDevicePosition
};
static
AudioSessionWrapper
*
AudioSessionWrapper_Create
(
ACImpl
*
client
)
{
AudioSessionWrapper
*
ret
;
...
...
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