|Microsoft DirectX 9.0|
The IsPlaying method ascertains whether a specified segment or segment state is currently being heard from the speakers.
HRESULT IsPlaying( IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState );
Segment to check. If NULL, check only pSegState.
Segment state to check. If NULL, check only pSegment.
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.
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.
Header: Declared in dmusici.h.