Funzione AcxRtStreamNotifyPacketComplete (acxstreams.h)
Il driver chiama AcxRtStreamNotifyPacketComplete al termine di un pacchetto. Il tempo di completamento dei pacchetti e l'indice di pacchetti basato su 0 sono inclusi per migliorare le prestazioni del client. Il framework ACX imposta tutti gli eventi di notifica associati al flusso.
Sintassi
NTSTATUS AcxRtStreamNotifyPacketComplete(
ACXSTREAM Stream,
ULONGLONG CompletedPacket,
ULONGLONG QPCCompletion
);
Parametri
Stream
Oggetto ACXSTREAM esistente. Un oggetto ACXSTREAM rappresenta un flusso audio creato da un circuito. Il flusso è costituito da un elenco di elementi creati in base agli elementi del circuito padre.
CompletedPacket
Indice del pacchetto in base 0 che indica il pacchetto appena completato.
QPCCompletion
Tempo di completamento del pacchetto, restituito da KeQueryPerformanceCounter. Questo valore deve essere il più vicino possibile al completamento effettivo dell'hardware( ad esempio, il driver può chiamare KeQueryPerformanceCounter da nella routine di interrupt del servizio).
Valore restituito
Restituisce STATUS_SUCCESS
se la chiamata ha avuto esito positivo. In caso contrario, restituisce un codice di errore appropriato. Per altre informazioni, vedere Uso di valori NTSTATUS.
Osservazioni
AcxRtStreamNotifyPacketComplete deve essere chiamato in DISPATCH_LEVEL o di seguito.
Esempio
Di seguito è riportato un esempio di utilizzo.
completedPacket = (ULONG)InterlockedIncrement((LONG*)&m_CurrentPacket) - 1;
InterlockedExchange64(&m_LastPacketStart.QuadPart, m_CurrentPacketStart.QuadPart);
InterlockedExchange64(&m_CurrentPacketStart.QuadPart, QPC.QuadPart);
// Tell ACX we've completed the packet.
(void)AcxRtStreamNotifyPacketComplete(m_Stream, completedPacket, QPC.QuadPart);
Requisiti ACX
versione minima di ACX: 1.0
Per altre informazioni sulle versioni di ACX, vedere panoramica della versione ACX.
Fabbisogno
Requisito | Valore |
---|---|
intestazione | acxstreams.h |
IRQL | <= DISPATCH_LEVEL |