Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winepulse.drv/mmdevdrv.c | 11 +++-------- dlls/winepulse.drv/pulse.c | 15 +++++++++++++++ dlls/winepulse.drv/unixlib.h | 1 + 3 files changed, 19 insertions(+), 8 deletions(-)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90869
Your paranoid android.
=== debiant2 (build log) ===
error: patch failed: dlls/winepulse.drv/pulse.c:1532 error: patch failed: dlls/winepulse.drv/unixlib.h:84 Task: Patch failed to apply
=== debiant2 (build log) ===
error: patch failed: dlls/winepulse.drv/pulse.c:1532 error: patch failed: dlls/winepulse.drv/unixlib.h:84 Task: Patch failed to apply
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Wed, May 19, 2021 at 10:24:02PM +0200, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/winepulse.drv/mmdevdrv.c | 11 +++-------- dlls/winepulse.drv/pulse.c | 15 +++++++++++++++ dlls/winepulse.drv/unixlib.h | 1 + 3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index 292d85a1c1f..751f272c4b4 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -612,20 +612,15 @@ static HRESULT WINAPI AudioClient_GetBufferSize(IAudioClient3 *iface, UINT32 *out) { ACImpl *This = impl_from_IAudioClient3(iface);
HRESULT hr;
TRACE("(%p)->(%p)\n", This, out);
if (!out) return E_POINTER;
- if (!This->pulse_stream)
return AUDCLNT_E_NOT_INITIALIZED;
- pulse->lock();
- hr = pulse_stream_valid(This);
- if (SUCCEEDED(hr))
*out = This->pulse_stream->bufsize_frames;
- pulse->unlock();
- return hr;
- return pulse->get_buffer_size(This->pulse_stream, out);
}
static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient3 *iface, diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index 3fc238faf39..0b8c187c254 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -1532,6 +1532,20 @@ static HRESULT WINAPI pulse_release_render_buffer(struct pulse_stream *stream, U return S_OK; }
+static HRESULT WINAPI pulse_get_buffer_size(struct pulse_stream *stream, UINT32 *out) +{
- HRESULT hr = S_OK;
- pulse_lock();
- if (!pulse_stream_valid(stream))
hr = AUDCLNT_E_DEVICE_INVALIDATED;
- else
*out = stream->bufsize_frames;
- pulse_unlock();
- return hr;
+}
static void WINAPI pulse_set_volumes(struct pulse_stream *stream, float master_volume, const float *volumes, const float *session_volumes) { @@ -1573,6 +1587,7 @@ static const struct unix_funcs unix_funcs = pulse_timer_loop, pulse_get_render_buffer, pulse_release_render_buffer,
- pulse_get_buffer_size, pulse_set_volumes, pulse_set_event_handle, pulse_test_connect,
diff --git a/dlls/winepulse.drv/unixlib.h b/dlls/winepulse.drv/unixlib.h index 9242cb3856b..22bcf9c4bc2 100644 --- a/dlls/winepulse.drv/unixlib.h +++ b/dlls/winepulse.drv/unixlib.h @@ -84,6 +84,7 @@ struct unix_funcs HRESULT (WINAPI *get_render_buffer)(struct pulse_stream *stream, UINT32 frames, BYTE **data); HRESULT (WINAPI *release_render_buffer)(struct pulse_stream *stream, UINT32 written_frames, DWORD flags);
- HRESULT (WINAPI *get_buffer_size)(struct pulse_stream *stream, UINT32 *out); void (WINAPI *set_volumes)(struct pulse_stream *stream, float master_volume, const float *volumes, const float *session_volumes); HRESULT (WINAPI *set_event_handle)(struct pulse_stream *stream, HANDLE event);