mmdevapi: GetDevicePeriod returns constants.
This commit is contained in:
parent
8316a77959
commit
acd8d60faa
@ -1396,21 +1396,10 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient *iface,
|
|||||||
if(!defperiod && !minperiod)
|
if(!defperiod && !minperiod)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
OSSpinLockLock(&This->lock);
|
if(defperiod)
|
||||||
|
*defperiod = DefaultPeriod;
|
||||||
if(This->period_ms){
|
if(minperiod)
|
||||||
if(defperiod)
|
*minperiod = MinimumPeriod;
|
||||||
*defperiod = This->period_ms * 10000;
|
|
||||||
if(minperiod)
|
|
||||||
*minperiod = This->period_ms * 10000;
|
|
||||||
}else{
|
|
||||||
if(defperiod)
|
|
||||||
*defperiod = DefaultPeriod;
|
|
||||||
if(minperiod)
|
|
||||||
*minperiod = MinimumPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
OSSpinLockUnlock(&This->lock);
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1261,15 +1261,11 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient *iface,
|
|||||||
if(!defperiod && !minperiod)
|
if(!defperiod && !minperiod)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
EnterCriticalSection(&This->lock);
|
|
||||||
|
|
||||||
if(defperiod)
|
if(defperiod)
|
||||||
*defperiod = DefaultPeriod;
|
*defperiod = DefaultPeriod;
|
||||||
if(minperiod)
|
if(minperiod)
|
||||||
*minperiod = MinimumPeriod;
|
*minperiod = MinimumPeriod;
|
||||||
|
|
||||||
LeaveCriticalSection(&This->lock);
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user