Commit fd812bdc authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winecoreaudio: Implement WIDM_GETPOS.

parent 57d1548b
......@@ -2129,6 +2129,29 @@ static DWORD widStop(WORD wDevID)
return ret;
}
/**************************************************************************
* widGetPos [internal]
*/
static DWORD widGetPos(WORD wDevID, LPMMTIME lpTime, UINT size)
{
DWORD val;
WINE_WAVEIN* wwi;
TRACE("(%u);\n", wDevID);
if (wDevID >= MAX_WAVEINDRV)
{
WARN("invalid device ID\n");
return MMSYSERR_INVALHANDLE;
}
wwi = &WInDev[wDevID];
OSSpinLockLock(&WInDev[wDevID].lock);
val = wwi->dwTotalRecorded;
OSSpinLockUnlock(&WInDev[wDevID].lock);
return bytes_to_mmtime(lpTime, val, &wwi->format);
}
/**************************************************************************
* widReset [internal]
......@@ -2283,6 +2306,7 @@ DWORD WINAPI CoreAudio_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
case WIDM_RESET: return widReset (wDevID);
case WIDM_START: return widStart (wDevID);
case WIDM_STOP: return widStop (wDevID);
case WIDM_GETPOS: return widGetPos (wDevID, (LPMMTIME)dwParam1, (UINT)dwParam2 );
case DRV_QUERYDEVICEINTERFACESIZE: return widDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
case DRV_QUERYDEVICEINTERFACE: return widDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
case DRV_QUERYDSOUNDIFACE: return widDsCreate (wDevID, (PIDSCDRIVER*)dwParam1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment