Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RainDMPerf8 Class Reference

#include <RainMusic.h>

List of all members.

Public Methods

 RainDMPerf8 (void)
 ~RainDMPerf8 (void)
HRESULT Initialize (char **p_szSongNameArray, UINT uMaxSizeOfArray, IDirectMusicLoader8 **ppLoader)
HRESULT SetTrackFile (char *szFile, UINT uIdx, IDirectMusicLoader8 **ppLoader)
HRESULT PlayTrack (UINT uIdx, DWORD dwRepeats)
 
Parameters:
dwRepeats:  Use the REPEAT_FOREVER flag to play track until RainDMPerf8::Stop(); is called.
More...


HRESULT Stop (void)

Protected Attributes

IDirectMusicPerformance8 * m_pPerformance
IDirectMusicSegment8 ** m_ppSegment
bool m_bHavePrimarySegment

Friends

class AllAudio


Detailed Description

The RainDMPerf8 class is created in AllAudio as pPerfMusic and pPerfSound. All funcion calls of the RainDMPerf8 class can be used by, and are recomended to be used by, the AllAudio class. Most projects will have no reason to create their own RainDMPerf8 class. Volume control for sounds is done per RainDMPerf8 class, all DirectMusic Segments are controled by this class. Although the pPerfMusic variable has access to an array of Segments, all but the zeroth element will not be acessable, and may cause instabilty if created.


Constructor & Destructor Documentation

RainDMPerf8::RainDMPerf8 void   
 

Default Constructor.

RainDMPerf8::~RainDMPerf8 void   
 

Default Destructor. Must be called to avoid memory leak.


Member Function Documentation

HRESULT RainDMPerf8::Initialize char **    p_szSongNameArray,
UINT    uMaxSizeOfArray,
IDirectMusicLoader8 **    ppLoader
 

Creates an array of DirectMusic Segements and loads a file into each one. The pPerfMusic object should only have one Segment at a time.

HRESULT RainDMPerf8::PlayTrack UINT    uIdx,
DWORD    dwRepeats
 

Parameters:
dwRepeats:  Use the REPEAT_FOREVER flag to play track until RainDMPerf8::Stop(); is called.

Plays a sound file from a DirectMusic Segment in the array based off the uIdx paramiter. Make sure to initialze the Segment prior to calling this function by either the RainPerf8::Initialize function by setting it specifically with RainPerf8::SetTrackFile.

HRESULT RainDMPerf8::SetTrackFile char *    szFile,
UINT    uIdx,
IDirectMusicLoader8 **    ppLoader
 

loads a file into one DirectMusic Segment in the array. Isn't noramally needed as all Segments are initialized in the RainPerf8::Initialize function.

HRESULT RainDMPerf8::Stop void   
 

Stops all playing Segments.


Friends And Related Function Documentation

friend class AllAudio [friend]
 


Member Data Documentation

bool RainDMPerf8::m_bHavePrimarySegment [protected]
 

IDirectMusicPerformance8* RainDMPerf8::m_pPerformance [protected]
 

IDirectMusicSegment8** RainDMPerf8::m_ppSegment [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu May 23 17:51:01 2002 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001