Microsoft DirectX 8.0 (C++) |
Determines whether a particular segment or segment state is currently being heard from the speakers.
HRESULT IsPlaying( IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState );
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 following error values:
E_POINTER |
DMUS_E_NO_MASTER_CLOCK |
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.