Partager via


IDirectMusicPerformance8::IsPlaying

The IsPlaying method ascertains whether a specified segment or segment state is currently being heard from the speakers.

Syntax

HRESULT IsPlaying(
  IDirectMusicSegment* pSegment,
  IDirectMusicSegmentState* pSegState
);

Parameters

pSegment

Segment to check. If NULL, check only pSegState.

pSegState

Segment state to check. If NULL, check only pSegment.

Return Values

If the method succeeds and the requested segment or segment state is playing, the return value is S_OK. If neither is playing or only one was requested and it is not playing, the return value is S_FALSE.

If it fails, the method can return one of the error values shown in the following table.

Return code
E_POINTER
DMUS_E_NO_MASTER_CLOCK

Remarks

The method returns S_OK only if the segment or segment state is actually playing at the speakers. Because of latency, this method might return S_FALSE even though IDirectMusicPerformance8::PlaySegment or IDirectMusicPerformance8::PlaySegmentEx has just been called on the segment. Similarly, the method returns S_OK as long as the segment is being heard, even though all messages might already have been dispatched.

Requirements

**  Header:** Dmusici.h
  Library: Dmime.dll, Dmimed.dll

See Also

© 2004 Microsoft Corporation. All rights reserved.