Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winepulse.drv/mmdevdrv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Mon, May 24, 2021 at 06:22:02PM +0200, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/winepulse.drv/mmdevdrv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index cac169567ea..84ab5b6adec 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -1472,22 +1472,22 @@ static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( IAudioStreamVolume *iface, UINT32 index, float level) { ACImpl *This = impl_from_IAudioStreamVolume(iface);
HRESULT hr;
float volumes[PA_CHANNELS_MAX];
TRACE("(%p)->(%d, %f)\n", This, index, level);
if (level < 0.f || level > 1.f) return E_INVALIDARG;
- if (!This->pulse_stream)
if (index >= This->channel_count) return E_INVALIDARG;return AUDCLNT_E_NOT_INITIALIZED;
- hr = AudioStreamVolume_GetAllVolumes(iface, This->channel_count, volumes);
- volumes[index] = level;
- if (SUCCEEDED(hr))
hr = AudioStreamVolume_SetAllVolumes(iface, This->channel_count, volumes);
- return hr;
- pulse->lock();
- This->vol[index] = level;
- set_stream_volumes(This);
- pulse->unlock();
- return S_OK;
}
static HRESULT WINAPI AudioStreamVolume_GetChannelVolume(