Copyright: (c) 1996 Microsoft


AudioActive
AudioActive Version 2.0

Helper functions

AllocAAClock

AllocAAEngine

AllocAAMIDIIn

AllocAAMIDIOut

AllocAARealTime

AudioActiveSimpleInit

LoadBandFile

LoadMotifFile

LoadPatternFile

LoadPersonalityByName

LoadPersonalityFile

LoadSectionFile

LoadSongFile

LoadStyleByName

LoadStyleFile

LoadTemplateFile

Interfaces

IAABand

IClock

IAAEngine

IAAEventSink

IAALoader

IAAMIDIIn

IAAMIDIOut

IAAMIDISink

IAAMotif

IAANotifySink

IAAPattern

IAAPersonality

IAARealTime

IAASection

IAASong

IAAStyle

IAATemplate

Structures

AABANDDATA

AACHORD

AACLICK

AACOMMAND

AAEVENT

AAMOTIFDATA

AAPATTERNDATA

AAPERSONALITYDATA

AASECTIONDATA

AASONGDATA

AASTYLEDATA

AATEMPLATEDATA


AudioActiveSimpleInit

HRESULT AudioActiveSimpleInit( LPAAENGINE* ppEngine, LPAANOTIFYSINK pNotifySink, LPAALOADER pLoader )

This function is the simplest way to initialize AudioActive for most applications.  This function goes through the following steps:

•	AllocAAEngine() is called.

•	AllocAARealTime() is called.

•	AllocAAClock() is called.

•	AllocAAMIDIOut() is called.

•	the IAARealTime interface is registered with the IAAEngine interface.

•	the IAAEventSink associated with the IAARealTime interface is also registered with the IAAEngine interface.

•	the IClock interface is registered with the IAARealTime interface

•	the IAAMIDISink interface associated with the IAAMIDIOut interface is registered with the IAARealTime interface.

•	if the IAALoader pointer passed was NULL, a default loader is allocated.  The IAALoader is then registered with the IAAEngine interface.

•	the user supplied IAANotifySink interface is registered with the IAARealTime interface.

The IAAEngine interface allocated is returned via the ppEngine variable.  The other allocated interfaces may be determined by querying the links to them.  If pNotifySink is NULL no notification sink will be automatically registered.

RETURN VALUES:

S_OK	Everything initialized correctly.

E_OUTOFMEMORY	One of the interfaces could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


AllocAAClock

HRESULT AllocAAClock( LPCLOCK* ppClock )

This function allocates the default implementation of the IClock interface.  A pointer to the interface is returned in the address pointed to by ppClock.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


AllocAAEngine

HRESULT AllocAAEngine( LPAAENGINE* ppEngine )

This function allocates the default implementation of the IAAEngine interface.  A pointer to the interface is returned in the address pointed to by ppEngine.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


AllocAAMIDIIn

HRESULT AllocAAMIDIIn( LPAAMIDIIN* ppMIDIIn )

This function allocates the default implementation of the IAAMIDIIn interface.  A pointer to the interface is returned in the address pointed to by ppMIDIIn.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


AllocAAMIDIOut

HRESULT AllocAAMIDIOut( LPAAMIDIOUT* ppMIDIOut )

This function allocates the default implementation of the IAAMIDIOut interface.  Note that the default version of the IAAMIDIOut interface also supports the IAAMIDISink interface.  A pointer to the interface is returned in the address pointed to by ppMIDIOut.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


AllocAARealTime

HRESULT AllocAARealTime( LPAAREALTIME* ppRealTime )

This function allocates the default implementation of the IAARealTime interface.  Note that the default implementation of the IAARealTime interface also supports the IAAEventSink and IAAMIDISink interfaces.  A pointer to the interface is returned in the address pointed to by ppRealTime.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


LoadBandFile

HRESULT LoadBandFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAABAND* ppBand );

This function allocates and loads a band from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadMotifFile

HRESULT LoadMotifFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAAMOTIF* ppMotif );

This function allocates and loads a motif from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadPatternFile

HRESULT LoadPatternFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAAPATTERN* ppPattern );

This function allocates and loads a pattern from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadPersonalityByName

HRESULT LoadPersonalityByName( LPAAENGINE pEngine, LPCTSTR pszName, LPAAPERSONALITY* ppPersonality );

This function allocates and loads a personality by name using the IAALoader interface registered with the IAAEngine passed.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The personality could not be opened.


LoadPersonalityFile

HRESULT LoadPersonalityFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAAPERSONALITY* ppPersonality );

This function allocates and loads a personality from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadSectionFile

HRESULT LoadSectionFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAASECTION* ppSection );

This function allocates and loads a section from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadSongFile

HRESULT LoadSongFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAASONG* ppSong );

This function allocates and loads a song from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadStyleByName

HRESULT LoadStyleByName( LPAAENGINE pEngine, LPCTSTR pszName, LPAASTYLE* ppStyle );

This function allocates and loads a style by name using the IAALoader interface registered with the IAAEngine passed.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The style could not be opened.


LoadStyleFile

HRESULT LoadStyleFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAASTYLE* ppStyle );

This function allocates and loads a style from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


LoadTemplateFile

HRESULT LoadTemplateFile( LPAAENGINE pEngine, LPCTSTR pszFileName, LPAATEMPLATE* ppTemplate );

This function allocates and loads a template from a file.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.

E_FAIL	The file could not be opened.


AABANDDATA

typedef struct AABANDDATA

{

short cbStructSize;

short nBandType;

*** TO BE DETERMINED

} AABANDDATA;


AACHORD

typedef struct AACHORD

{

short cbStructSize;

short nChordType;

struct AACHORD* pNext;

long lTime;

*** TO BE DETERMINED

} AACHORD;


AACLICK

typedef struct AACLICK

{

short cbStructSize;

short nClickType;

struct AACLICK* pNext;

*** TO BE DETERMINED

} AACLICK;


AACOMMAND

typedef struct AACOMMAND

{

short cbStructSize;

short nCommandType;

struct AACOMMAND* pNext;

long lTime;

*** TO BE DETERMINED

} AACOMMAND;


AAEVENT

typedef struct AAEVENT

{

short cbStructSize;

short nEventType;

struct AAEVENT* pNext;

long lTime;

*** TO BE DETERMINED

} AAEVENT;


AAMOTIFDATA

typedef struct AAMOTIFDATA

{

short cbSize;

short nMotifType;

*** TO BE DETERMINED

} AAMOTIFDATA;


AAPATTERNDATA

typedef struct AAPATTERNDATA

{

short cbStructSize;

short nPatternType;

*** TO BE DETERMINED

} AAPATTERNDATA;


AAPERSONALITYDATA

typedef struct AAPERSONALITYDATA

{

short cbStructSize;

short nPersonalityType;

*** TO BE DETERMINED

} AAPERSONALITYDATA;


AASECTIONDATA

typedef struct AASECTIONDATA

{

short cbStructSize;

short nSectionType;

*** TO BE DETERMINED

} AASECTIONDATA;


AASONGDATA

typedef struct AASONGDATA

{

short cbStructSize;

short nSongType;

*** TO BE DETERMINED

} AASONGDATA;


AASTYLEDATA

typedef struct AASTYLEDATA

{

short cbStructSize;

short nStyleType;

*** TO BE DETERMINED

} AASTYLEDATA;


AATEMPLATEDATA

typedef struct AATEMPLATEDATA

{

short cbStructSize;

short nTemplateType;

*** TO BE DETERMINED

} AATEMPLATEDATA;


IAAEngine
IAAEngine interface

interface IAAEngine : IUnknown

{

LPAAPERSONALITY get_Personality( LPSTR pszName );

LPAASTYLE get_Style( LPSTR pszName );

HRESULT AllocBand( LPAABAND* ppBand );

HRESULT AllocMotif( LPAAMOTIF* ppMotif );

HRESULT AllocPattern( LPAAPATTERN* ppPattern );

HRESULT AllocPersonality( LPAAPERSONALITY* ppPersonality );

HRESULT AllocSection( LPAASECTION* ppSection );

HRESULT AllocSong( LPAASONG* ppSong );

HRESULT AllocStyle( LPAASTYLE* ppStyle );

HRESULT AllocTemplate( LPAATEMPLATE* ppTemplate );

HRESULT AutoTransition( LPAASECTION pToSection, AACommands command, AAFlags flags );

HRESULT ComposeSection( LPAASTYLE pStyle, LPAAPERSONALITY pPersonality, LPAATEMPLATE pTemplate, short nActivity, LPAASECTION* ppSection);

HRESULT ComposeSectionFromShape( LPAASTYLE pStyle, LPAAPERSONALITY pPersonality, short nActivity, AAShape shape, short nNumMeasures, AACommands command, LPAASECTION* ppSection);

HRESULT ComposeTemplateFromShape( AAShape shape, short nNumMeasures, LPAATEMPLATE* pTemplate );

HRESULT ComposeTransition( LPAASECTION pFromSection, LPAASECTION pToSection, short nMeasureNum, AACommands command, AAFlags flags, LPAASECTION* ppSection );

HRESULT FlushSectionQueue();

LPAASECTION GetCurrentSection();

LPAAEVENTSINK GetEventSink();

LPAALOADER GetLoader();

LPAAREALTIME GetRealTime();

VARIANT_BOOL IsPlaying();

HRESULT PlayMotif( LPAAMOTIF pMotif, long fFlags );

HRESULT PlaySection( LPAASECTION pSection, long fFlags, long lStartTime );

HRESULT PlaySong( LPAASONG pSong, long fFlags, long lStartTime );

HRESULT RegisterEventSink( LPAAEVENTSINK pEventSink );

HRESULT RegisterLoader( LPAALOADER pLoader );

HRESULT RegisterRealTime( LPAAREALTIME pRealTime );

HRESULT ReleaseAllPersonalities();

HRESULT ReleaseAllStyles();

HRESULT ReleasePersonality( LPAAPERSONALITY pPersonality);

HRESULT ReleaseStyle( LPAASTYLE pStyle);

HRESULT SetDebug( short nDebug );

HRESULT SetPrepareTime( short nPrepareTime );

HRESULT Stop( long fFlags );

};

This interface represents the AudioActive composition engine.  The IAAEngine interface works with and knows intimately the data object interfaces: IAABand, IAAMotif, IAAPattern, IAAPersonality, IAASection, IAASong, IAAStyle, and IAATemplate.  The IAAEngine is responsible for generating the music to be played based on these data interfaces and passes it on to the IAARealTime interface for the actual playback.


IAARealTime
IAARealTime interface

interface IAARealTime : IUnknown

{

long get_MusicTime();

short get_Mutes();

HRESULT put_Mutes( short nMutes );

short get_PPQN();

short get_RelTempo();

HRESULT put_RelTempo( short nTempo );

short get_RelVolume();

HRESULT put_RelVolume( short nVolume );

long get_Tempo();

HRESULT put_Tempo( long lTempo );

long get_TimeSignature();

HRESULT put_TimeSignature( long lTimeSignature );

HRESULT FlushEventsAfterTime( long lTime );

LPCLOCK GetClock();

LPAANOTIFYSINK GetNotifySink();

HRESULT RegisterClock( LPCLOCK pClock );

HRESULT RegisterNotifySink( LPAANOTIFYSINK pNotifySink );

HRESULT ResetMusicTime();

HRESULT Start();

HRESULT Stop();

};

This interface represents the playback engine of AudioActive.  It also supports the IAAEventSink interface and the IAAMIDISink interface.  It is responsible for maintaining the queue of raw events to be played and playing them back on time by sending them out to a registered IAAMIDISink interface.  The interface retrieces its timing data solely from the registered IClock interface.  An application can force synchronization by replacing the IClock implementation with one of its own.


IAAEventSink
IAAEventSink interface

interface IAAEventSink : IUnknown

{

LPAAEVENTSINK GetEventSink();

HRESULT QueueEvent( AAEVENT* pEvent );

HRESULT RegisterEventSink( LPAAEVENTSINK pEventSink );

};

This interface is responsible for receiving  AAEVENTs and optionally passing them on to the next IAAEventSink a chain that will ultimately lead to the IAARealTime interface.  It is not required to sort the events in any way, nor can it expect events to arrive in a sorted order.


IAAMIDISink
IAAMIDISink interface

interface IAAMIDISink : IUnknown

{

LPAAMIDISINK GetMIDISink();

HRESULT PlayMIDIEvent( long lMIDIEvent, long lTimeInMils );

HRESULT RegisterMIDISink( LPAAMIDISINK pMIDISink );

};

This interface is responsible for receiving  MIDI events and optionally passing them on to the next IAAMIDISink a chain that will ultimately lead to some sort of output device, possibly the IAAMIDIOut interface.  It is not required to pay any attention to the lTimeInMils field (i.e. it may play events immediately as they are received) but must preserve it.


IAALoader

interface IAALoader : IUnknown

{

LPSTR GetFirstPersonalityName();

LPSTR GetFirstStyleName();

LPSTR GetNextPersonalityName( LPSTR pszPrevPersonalityName );

LPSTR GetNextStyleName( LPSTR pszPrevStyleName );

HRESULT LoadPersonality( LPSTR pszFileName, LPSTR pszPersonalityName, LPAAPERSONALITY* ppPersonality );

HRESULT LoadStyle( LPSTR pszFileName, LPSTR pszStyleName, LPAASTYLE* ppStyle );

HRESULT SetSearchDirectory( LPSTR pszDirectoryName, AAFlags fFlags );

};

This interface loads referenced data objects when loading sections or styles.  An application my override this interface o provide whatever processing is necessary to load the referenced files from whatever stream is necessary.  This interface is also responsible for maintaining the database of available style and personality names.


IAANotifySink
IAANotifySink interface

interface IAANotifySink : IUnknown

{

HRESULT OnSongStarted( LPAASONG pSong, AAFlags flags );

HRESULT OnSongEnded( LPAASONG pSong, AAFlags flags, long lEndTime );

HRESULT OnSectionStarted( LPAASECTION pSection, AAFlags flags );

HRESULT OnSectionEnded( LPAASECTION pSection, AAFlags flags, long lEndTime );

HRESULT OnSectionChanged( LPAASECTION pSection, AAFlags flags );

HRESULT OnNextSection( LPAASECTION pSection, AAFlags flags );

HRESULT OnEmbellishment( AACommands embellishment, AAFlags flags );

HRESULT OnGroove( AACommands groove, AAFlags flags );

HRESULT OnMetronome( short nMeasure, short nBeat );

HRESULT OnMIDIInput( long lMIDIEvent, long lMusicTime );

HRESULT OnNotePlayed( AAEVENT* pEvent );

};

This interface is implemented by the application to receive notification events from the AudioActive playback engine.  These callbacks should take as little time as possible as long processing times may interfere with the timing of the music being played.


IAAMIDIIn
IAAMIDIIn interface

interface IAAMIDIIn : IUnknown

{

HRESULT Activate();

HRESULT Deactivate();

LPAAMIDISINK GetMIDISink();

HRESULT RegisterMIDISink( LPAAMIDISINK pMIDISink );

HRESULT SetDevice( short nDeviceID );

};

This function implements MIDI input.  If MIDI input is not necessary for your application, it is recommended that this interface not be allocated.


IAAMIDIOut
IAAMIDIOut interface

interface IAAMIDIOut : IUnknown

{

HRESULT Activate();

HRESULT Deactivate();

HRESULT SetDevice( short nDeviceID );

};

This interface implements MIDI output.  It must also implement the IAAMIDISink interface to receive the actual MIDI events.


IClock
IClock interface

interface IClock : IUnknown

{

long GetTime();

};

This interface is responsible for keeping track of the current time in milliseconds for the IAARealTime interface's use.


IAASection
IAASection interface

interface IAASection : IUnknown

{

LPAABAND get_Band();

HRESULT put_Band( LPAABAND pBand );

short get_Key();

HRESULT put_Key( short nKey );

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

short get_Length();

HRESULT put_Length( short nLength );

long get_LengthInMils();

LPAAPERSONALITY get_Personality();

HRESULT put_Personality( LPAAPERSONALITY pPersonality );

short get_Repeats();

HRESULT put_Repeats( short nRepeats );

LPAASTYLE get_Style();

HRESULT put_Style( LPAASTYLE pStyle );

long get_Tempo();

HRESULT put_Tempo( long lTempo );

long get_UserData();

HRESULT put_UserData( long lUserData );

LPAASECTION Clone();

short GetCurrentMeasure();

HRESULT GetData( LPAASECTIONDATA pSection );

VARIANT_BOOL IsPlaying();

HRESULT Play( AAFlags flags, long lStartTime );

HRESULT RemoveFromQueue();

HRESULT SaveAsMIDI( LPUNKNOWN pStream );

HRESULT SetData( LPAASECTIONDATA pSection );

HRESULT Stop( AAFlags flags );

};

This interface respresents a section of music.  It must also support the IPersistStream interface so that sections may be loaded and saved.


IAASong
IAASong interface

interface IAASong : IUnknown

{

LPSTR get_Author();

HRESULT put_Author( LPSTR pszAuthor );

short get_Length();

long get_LengthInMils();

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

HRESULT AppendSection( LPAASECTION pSection );

IAASong* Clone();

HRESULT GetData( LPAASONGDATA pSong );

LPAASECTION GetFirstSection();

LPAASECTION GetNextSection( LPAASECTION pSection );

HRESULT InsertSection( LPAASECTION pPrevSection, LPAASECTION pSection );

VARIANT_BOOL IsPlaying();

HRESULT Play( AAFlags flags, long lStartTime );

HRESULT ReleaseSection( LPAASECTION pSection );

HRESULT SaveAsMIDI( LPUNKNOWN pStream );

HRESULT SetData( LPAASONGDATA pSong );

HRESULT Stop( AAFlags flags );

};

This interface respresents a song composed of a list of sections.  It must also support the IPersistStream interface so that songs may be loaded and saved.


IAAMotif
IAAMotif interface

interface IAAMotif : IUnknown

{

LPAABAND get_Band();

HRESULT put_Band( LPAABAND pBand );

short get_BeatsPerMeasure();

short get_ClicksPerBeat();

short get_Length();

HRESULT put_Length( short nLength );

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

LPAAMOTIF Clone();

HRESULT GetData( LPAAMOTIFDATA pMotif );

VARIANT_BOOL IsPlaying();

HRESULT Play( AAFlags flags );

HRESULT SetData( LPAAMOTIFDATA pMotif );

HRESULT Stop( AAFlags flags );

};

This interface respresents a musical motif.  It must also support the IPersistStream interface so that motifs may be loaded and saved.


IAAStyle
IAAStyle interface

interface IAAStyle : IUnknown

{

LPAABAND get_Band( LPSTR pszName );

short get_BeatsPerMeasure();

HRESULT put_BeatsPerMeasure( short nBeatsPerMeasure );

short get_ClicksPerBeat();

HRESULT put_ClicksPerBeat( short nClicksPerBeat );

long get_DefaultTempo();

HRESULT put_DefaultTempo( long lTempo );

LPAAMOTIF get_Motif( LPSTR pszName );

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

LPAAPATTERN get_Pattern( LPSTR pszName );

LPAAPERSONALITY get_Personality( LPSTR pszName );

HRESULT AddBand( LPAABAND pBand );

HRESULT AddMotif( LPAAMOTIF pMotif );

HRESULT AddPattern( LPAAPATTERN pPattern );

HRESULT AddPersonality( LPAAPERSONALITY pPersonality );

LPAASTYLE Clone();

HRESULT GetData( LPAASTYLEDATA pStyle );

LPAABAND GetDefaultBand();

LPAAPERSONALITY GetDefaultPersonality();

LPAABAND GetFirstBand();

LPAAMOTIF GetFirstMotif();

LPAAPATTERN GetFirstPattern();

LPAAPERSONALITY GetFirstPersonality();

LPAABAND GetNextBand( LPAABAND pBand );

LPAAMOTIF GetNextMotif( LPAAMOTIF pMotif );

LPAAPATTERN GetNextPattern( LPAAPATTERN pPattern );

LPAAPERSONALITY GetNextPersonality( LPAAPERSONALITY pPersonality );

HRESULT ReleaseBand( LPAABAND pBand );

HRESULT ReleaseMotif( LPAAMOTIF pMotif );

HRESULT ReleasePattern( LPAAPATTERN pPattern );

HRESULT ReleasePersonality( LPAAPERSONALITY pPersonality );

HRESULT SetData( LPAASTYLEDATA pStyle );

HRESULT SetDefaultBand( LPAABAND pBand );

HRESULT SetDefaultPersonality( LPAAPERSONALITY pPersonality );

};

This interface respresents a style of music.  It must also support the IPersistStream interface so that styles may be loaded and saved.


IAAPersonality
IAAPersonality interface

interface IAAPersonality : IUnknown

{

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

LPAAPERSONALITY Clone();

HRESULT GetData( LPAAPERSONALITYDATA pPersonality );

HRESULT SetData( LPAAPERSONALITYDATA pPersonality );

};

This interface respresents a musical personality.  It must also support the IPersistStream interface so that personalities may be loaded and saved.


IAABand
IAABand interface

interface IAABand : IUnknown

{

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

short get_Pan( short nInstrument );

HRESULT put_Pan( short nInstrument, short nPan );

short get_Patch( short nInstrument );

HRESULT put_Patch( short nInstrument, short nPan );

short get_Volume( short nInstrument );

HRESULT put_Volume( short nInstrument, short nVolume );

LPAABAND Clone();

HRESULT GetData( LPAABANDDATA pBand );

HRESULT SetData( LPAABANDDATA pBand );

};

This interface respresents a band.  It must also support the IPersistStream interface so that bands may be loaded and saved.


IAATemplate
IAATemplate interface

interface IAATemplate : IUnknown

{

short get_Length();

HRESULT put_Length( short nLength );

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

LPAATEMPLATE Clone();

HRESULT GetData( LPAATEMPLATEDATA pTemplate );

HRESULT SetData( LPAATEMPLATEDATA pTemplate );

};

This interface respresents a template used for composing new sections.  It must also support the IPersistStream interface so that templates may be loaded and saved.


IAAPattern
IAAPattern interface

interface IAAPattern : IUnknown

{

short get_BeatsPerMeasure();

short get_ClicksPerBeat();

short get_Length();

HRESULT put_Length( short nLength );

LPSTR get_Name();

HRESULT put_Name( LPSTR pszName );

LPAAPATTERN Clone();

HRESULT GetData( LPAAPATTERNDATA pPattern );

HRESULT SetData( LPAAPATTERNDATA pPattern );

};

This interface respresents a pattern, the basic building blocks of styles.  It must also support the IPersistStream interface so that patterns may be loaded and saved.


T_201338100001
IAASection->GetCurrentMeasure()

short GetCurrentMeasure();

This function returns the current measure of a playing section.  If the section is not currently playing, 0 is returned.


T_201338100001
IAASection->SaveAsMIDI()

HRESULT SaveAsMIDI( LPUNKNOWN pStream )

This function saves the section as a standard MIDI file in the passed stream.

RETURN VALUES

S_OK	The function succeeded

E_INVALIDARG	The stream passed is invalid


T_201338100001
IAASong->SaveAsMIDI()

HRESULT SaveAsMIDI( LPUNKNOWN pStream )

This function saves the song as a standard MIDI file in the passed stream.

RETURN VALUES

S_OK	The function succeeded

E_INVALIDARG	The stream passed is invalid


T_101219130001
IAAEngine->get_Personality()

LPAAPERSONALITY get_Personality( LPSTR pszName )

This function returns a pointer to the previously created or loaded personality whose name matches the passed string.  If no personality names match the string, NULL is returned.  If more than one personality exists with the same name, it is not guaranteed that this function will always return the same pointer.


T_101219130001
IAAEngine->get_Style()

LPAASTYLE get_Style( LPSTR pszName )

This function returns a pointer to the previously created or loaded style whose name matches the passed string.  If no style names match the string, NULL is returned.   If more than one style exists with the same name, it is not guaranteed that this function will always return the same pointer.


T_021414400001
IAALoader->LoadPersonality()

HRESULT LoadPersonality( LPSTR pszFileName, LPSTR pszPersonalityName, LPAAPERSONALITY* ppPersonality );

This function takes the filename and/or personality name and loads a personality based on it.  This function is called during the loading of sections or styles and may be overridden by the application by defining their own implementation of IAALoader.  If the application overrides this interface it should be prepared for either the filename or personality name being NULL.  This function may return a pointer to an already loaded personality or may open a stream and load a new one.

RETURN VALUES:

S_OK	The function succeeded.

E_FAIL	The function failed


T_021414400001
IAALoader->LoadStyle()

HRESULT LoadStyle( LPSTR pszFileName, LPSTR pszStyleName, LPAASTYLE* ppStyle );

This function takes the filename and/or personality name and loads a style based on it.  This function is called during the loading of sections and may be overridden by the application by defining their own implementation of IAALoader.  If the application overrides this interface it should be prepared for either the filename or style name being NULL.  This function may return a pointer to an already loaded style or may open a stream and load a new one.

RETURN VALUES:

S_OK	The function succeeded.

E_FAIL	The function failed


IAARealTime->get_PPQN()

short get_PPQN();

This function returns the PPQN value - Pulses Per Quarter Note.  This is the number of musical clock ticks it takes to make up a single quarter note.  For the current implementation of AudioActive this value is 192, but this is subject to change in future releases.


T_021414400001
IAAEngine->ComposeTransition()

HRESULT ComposeTransition( LPAASECTION pFromSection, LPAASECTION pToSection, short nMeasureNum, long fCommand, long fFlags, LPAASECTION* ppSection );

Composes a transition from the measure nMeasureNum in pFromSection to pToSection.  If pFromSection is NULL, the currently playing section is used.  pToSection may be NULL as long as AAF_MODULATE is not passed as one of the flags.  nMeasureNum may be 0 if pFromSection is NULL in which case the current measure of the current section is used.

Any one of the following commands may be passed in the lCommand parameter:

AAC_FILL	Perform a musical Fill during the transition.

AAC_BREAK	Perform a musical Break during the transition.

AAC_END	Resolve the first section with an ending.

AAC_INTRO	Play an intro before the next section.

AAC_GROOVE_A	Perform in a very low activity groove.

AAC_GROOVE_B	Perform in a low activity groove.

AAC_GROOVE_C	Perform in a regular activity groove.

AAC_GROOVE_D	Perform in a high activity groove.

These flags are valid for the fFlags parameter:

AAF_MODULATE	The music should modulate in key and personality from the first to the second section. Otherwise, it should stay in the key and personality of the starting section.

AAF_LONG	The transition should last two measures instead of one.

The IAANotifySink will receive callbacks when the transition section starts and ends just like any other section, except that the AAF_IS_TRANSITION flag will be set.

RETURN VALUES:

S_OK	The function succeeded.

AAE_NOCURRENTSECTION	NULL was passed as pFromSection and there is no currently playing section.

E_INVALIDARG	An invalid measure number was passed


T_021414400001
IAAEngine->GetLoader()

LPAALOADER GetLoader();

This function returns the current registered IAALoader interface.  If no IAALoader interface is registered, NULL is returned.


T_021414400001
IAAEngine->RegisterLoader()

HRESULT RegisterLoader( LPAALOADER pLoader );

This function registers an IAALoader interface with the IAAEngine.  This interface is used when loading styles or sections that make reference to personalities or styles that may exist in different streams.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is invalid


T_021414400001
IAAEngine->ReleaseStyle()

HRESULT ReleaseStyle( LPAASTYLE pStyle);

This function releases a specific style that the IAAEngine interface is keeping track of.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is unknown to the IAAEngine interface


T_021414400001
IAAEngine->ReleasePersonality()

HRESULT ReleasePersonality( LPAAPERSONALITY pPersonality);

This function releases a specific personality that the IAAEngine interface is keeping track of.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is unknown to the IAAEngine interface


T_021414400001
IAAEngine->ReleaseAllStyles()

HRESULT ReleaseAllStyles();

This function releases all styles that the IAAEngine interface keeps track of.

RETURN VALUES:

S_OK	The function succeeded.


T_021414400001
IAAEngine->ReleaseAllPersonalities()

HRESULT ReleaseAllPersonalities();

This function releases all personalities that the IAAEngine interface keeps track of.

RETURN VALUES:

S_OK	The function succeeded.


T_061714320001
IAABand->get_Name()

LPSTR get_Name();

This function returns the name of the band.  If the band name has not been explicitly set (for a newly allocated band) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAAMotif->get_Name()

LPSTR get_Name();

This function returns the name of the motif.  If the motif name has not been explicitly set (for a newly allocated motif) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAAPattern->get_Name()

LPSTR get_Name();

This function returns the name of the pattern.  If the pattern name has not been explicitly set (for a newly allocated pattern) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAAPersonality->get_Name()

LPSTR get_Name();

This function returns the name of the personality.  If the personality name has not been explicitly set (for a newly allocated personality) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAASection->get_Name()

LPSTR get_Name();

This function returns the name of the section.  If the section name has not been explicitly set (for a newly allocated section) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAASong->get_Name()

LPSTR get_Name();

This function returns the name of the song.  If the song name has not been explicitly set (for a newly allocated song) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAAStyle->get_Name()

LPSTR get_Name();

This function returns the name of the style.  If the style name has not been explicitly set (for a newly allocated style) the string returned will be "New".  In case of an error, NULL will be returned.


T_061714320001
IAATemplate->get_Name()

LPSTR get_Name();

This function returns the name of the template.  If the template name has not been explicitly set (for a newly allocated template) the string returned will be "New".  In case of an error, NULL will be returned.


T_071206110001
IAAEngine->PlaySection()

HRESULT PlaySection( LPAASECTION pSection, long fFlags, long lStartTime )

This function plays the section referred to by pSection.  Various flags sent via the fFlags parameter influence how the section is played.  Each of these flags is mutually exclusive - combining them may get unpredictable results.  In all cases if there is no currently playing section, the requested section begins playing immediately regardless of the fFlags parameter.

•	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section (if any) at the next measure boundary to begin playing the requested section.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section (if any) at the next beat boundary to begin playing the requested section.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section (if any) at the next click boundary to begin playing the requested section.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section (if any) immediately to begin playing the requested section.

•	AAF_QUEUE

Usage of this flag will queue the section to play when all currently pending sections have ended.  It is safe to queue the same section more than once.

•	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play so that the requested section will play as soon as the current one is finished.  This does not affect any repeats that the current section has yet to play.

•	AAF_FAIL_IF_PLAYING

Usage of this flag will cause the function to fail (returning E_FAIL) if there is a section currently playing.

The lStartTime parameter determines the offset into the song to begin playing music, in music time (see IAARealTime->get_PPQN()).

RETURN VALUES:

S_OK	The function succeeded.

E_POINTER	An invalid IAASection was passed.

E_INVALIDARG	An invalid flag was passed.

E_FAIL	Failed because a section is already playing.


T_071206110001
IAAEngine->PlaySong()

HRESULT PlaySong( LPAASONG pSong, long fFlags, long lStartTime )

This function plays the song referred to by pSong.  A song is composed of a sequence of sections which are played in order until completion.  Various flags sent via the fFlags parameter influence how the song is played.  Each of these flags is mutually exclusive - combining them may get unpredictable results.  In all cases if there is no currently playing section, the requested song begins playing immediately regardless of the fFlags parameter.

•	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section (if any) at the next measure boundary to begin playing the requested song.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section (if any) at the next beat boundary to begin playing the requested song.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section (if any) at the next click boundary to begin playing the requested song.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section (if any) immediately to begin playing the requested song.

•	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play so that the requested song will play as soon as the current section is finished.  This does not affect any repeats that the current section has yet to play.

•	AAF_FAIL_IF_PLAYING

Usage of this flag will cause the function to fail (returning E_FAIL) if there is a section currently playing.

The lStartTime parameter determines the offset into the section to begin playing music, in music time (see IAARealTime->get_PPQN()).

RETURN VALUES:

S_OK	The function succeeded.

E_POINTER	An invalid IAASong was passed.

E_INVALIDARG	An invalid flag was passed.

E_FAIL	Failed because a section is already playing.


T_071206110001
IAAEngine->PlayMotif()

HRESULT PlayMotif( LPAAMOTIF pMotif, long fFlags )

This function plays the motif referred to by pMotif.  A motif will only play if music is already playing.  A motif is very similar to a pattern - it may have variations and it plays transposed to the current key and chord.  By default, a motif can not overlap itself.  A playing motif must come to an end before the same motif may be played again.

The following flags are mutually exclusive.  Combining them may yield unpredictable results.

•	AAF_NEXT_MEASURE (default)

Usage of this flag plays the motif at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag plays the motif at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag plays the motif at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag plays the motif immediately.

The following flags may be combined as necessary.

•	AAF_ALLOW_OVERLAP

Usage of this flag will allow the motif to overlap itself, i.e. multiple copies of the same motif may be playing at the same time.

•	AAF_PLAY_WITH_STYLE

Usage of this flag ignores the motif's band and plays the motif with the currently playing style's band.  Also, instead of dynamically allocating unused MIDI channels, the channels of the style are used as well.

•	AAF_IGNORE_KEY

Usage of this flag plays the motif in the key it was designed in rather than the current key.  The motif will still be transposed to fit the current chord in the motif's key.

•	AAF_IGNORE_CHORD

Usage of this flag plays the motif in the chord it was designed in rather changing to fit the current chord.  The motif will still be transposed to fit the current key.

RETURN VALUES:

S_OK	The function succeeded.

AAE_NOMUSICPLAYING	The motif cannot play because there is no music playing.

AAE_ALREADYPLAYING	The motif is already playing and the AAF_ALLOW_OVERLAP flag has not been set.


T_071206110001
IAAEngine->Stop()

HRESULT Stop( long fFlags )

This function stops whatever music AudioActive is currently playing.  Any sections queued to be played in the future are flushed from the queue.

•	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section immediately.

•	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play.  This does not affect any repeats that the current section has yet to play.  This flag acts just like IAAEngine->FlushSectionQueue().

RETURN VALUES:

S_OK	The function succeeded.


T_071206110001
IAAEngine->FlushSectionQueue()

HRESULT FlushSectionQueue()

This function queues all pending sections that are queued but have not yet started.  If the currently playing section has a fixed number of repeats, this function does not affect pending repeats.

RETURN VALUES:

S_OK	The function succeeded.


T_071206110001
IAAEngine->GetCurrentSection()

LPAASECTION GetCurrentSection()

This function returns a pointer to the interface describing the currently playing section.  If no section is currently playing, a NULL is returned.

RETURN VALUES:

NULL	No section is currently playing.

non-NULL	pointer to interface describing the currently playing section


T_071206110001
IAAEngine->AutoTransition()

HRESULT AutoTransition( LPAASECTION pToSection, long lCommand, long fFlags );

This function automatically transitions from the current position in the playing section to the section provided.  Any pending sections will be flushed from the queue and the currently playing section (if any) will be set to stop at the next measure boundary.

Any one of the following commands may be passed in the lCommand parameter:

AAC_FILL	Perform a musical Fill during the transition.

AAC_BREAK	Perform a musical Break during the transition.

AAC_END	Resolve the first section with an ending.

AAC_INTRO	Play an intro before the next section.

AAC_GROOVE_A	Perform in a very low activity groove.

AAC_GROOVE_B	Perform in a low activity groove.

AAC_GROOVE_C	Perform in a regular activity groove.

AAC_GROOVE_D	Perform in a high activity groove.

These flags are valid for the fFlags parameter:

AAF_MODULATE	The music should modulate in key and personality from the first to the second section. Otherwise, it should stay in the key and personality of the starting section.

AAF_LONG	The transition should last two measures instead of one.

A transition is actually a small section that is composed on the fly and played.  The IAANotifySink will receive callbacks when the transition section starts and ends just like any other section, except that the AAF_IS_TRANSITION flag will be set.

RETURN VALUES:

S_OK	The function succeeded.


T_071206110001
IAAEngine->AllocSection()

HRESULT AllocSection( LPAASECTION* ppSection )

This function allocates a new blank section.   The section's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->ComposeSection()

HRESULT ComposeSection( LPAASTYLE pStyle, LPAAPERSONALITY pPersonality, LPAATEMPLATE pTemplate, short nActivity, LPAASECTION* ppSection )

This function uses the style, personality, and template to create an original section.  The length of the section will correspond to the length of the template passed.  If pPersonality is NULL, the default personality for the style is used.  The nActivity parameter specifies amount of chord change activity; valid values are 0 through 3, where 0 represents many chord changes and 3 represents very little chord movement.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function or nActivity is out of range.


T_071206110001
IAAEngine->ComposeSectionFromShape()

HRESULT ComposeSectionFromShape( LPAASTYLE pStyle, LPAAPERSONALITY pPersonality, short nActivity, ComposeShape shape, short nNumMeasures, long lCommand, LPAASECTION* ppSection )

This function uses the style, personality, and shape to create an original section.  The length of the section will correspond to the length of the template passed.  If pPersonality is NULL, the default personality for the style is used.  The nActivity parameter specifies amount of chord change activity; valid values are 0 through 3, where 0 represents many chord changes and 3 represents very little chord movement.

The shape parameter must be one of the following:

SH_FALLING

SH_LEVEL

SH_LOOPABLE

SH_LOUD

SH_QUIET

SH_PEAKING

SH_RANDOM

SH_RISING

SH_SONG

Note that for SH_SONG to work the section must be at least 32 measures in length.  If the section is less than 32 measures and SH_SONG is specified, SH_RISING will be used instead.

Valid values for the lCommand parameter include any combination of the following:

AAC_END	Play an ending at the end of the section.

AAC_INTRO	Play an intro at the beginning of the section.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocSong()

HRESULT AllocSong( LPAASONG* ppSong )

This function allocates a new empty song.  The Load() function exposed via the IPersistStream interface may be used to further initialize the song.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocMotif()

HRESULT AllocMotif( LPAAMOTIF* ppMotif )

This function allocates a new empty motif.  The motif's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocBand()

HRESULT AllocBand( LPAABAND* ppBand )

This function allocates a new band with default settings for all instruments.  The Load() function exposed via the IPersistStream interface may be used to further initialize the band.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocTemplate()

HRESULT AllocTemplate( LPAATEMPLATE* ppTemplate )

This function allocates a new empty template.  The template's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->ComposeTemplateFromShape()

HRESULT ComposeTemplateFromShape( ComposeShape shape, short nNumMeasures, LPAATEMPLATE* ppTemplate )

This function composes a new template based on a predefined shape.

The shape parameter must be one of the following:

SH_FALLING

SH_LEVEL

SH_LOOPABLE

SH_LOUD

SH_QUIET

SH_PEAKING

SH_RANDOM

SH_RISING

SH_SONG

Note that for SH_SONG to work the section must be at least 32 measures in length.  If the section is less than 32 measures and SH_SONG is specified, SH_RISING will be used instead.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocStyle()

HRESULT AllocStyle( LPAASTYLE* ppStyle )

This function allocates a new empty style.  The style's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocPersonality()

HRESULT AllocPersonality( LPAAPERSONALITY* ppPersonality )

This function allocates a new empty personality.  The personality's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_071206110001
IAAEngine->AllocPattern()

HRESULT AllocPattern( LPAAPATTERN* ppPattern )

This function allocates a new empty pattern.  The pattern's data must be set with SetData() or via the Load() function exposed via the IPersistStream interface.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	The interface could not be allocated.

E_INVALIDARG	An invalid pointer was passed to this function.


T_201647470001
IAALoader->GetFirstPersonalityName()

LPSTR GetFirstPersonalityName()

This function returns the first personality name in the global personality database.  If NULL is returned, there are no personalities available.


T_201647470001
IAALoader->GetFirstStyleName()

LPSTR GetFirstStyleName()

This function returns the first style name in the global style database.  If NULL is returned, there are no styles available.


T_201647470001
IAALoader->GetNextPersonalityName()

LPSTR GetNextPersonalityName( LPSTR pszPrevPersonalityName )

This function returns the next personality name in the global personality database after the name passed.  When the end of the list of personalities is reached, NULL is returned.


T_201647470001
IAALoader->GetNextStyleName()

LPSTR GetNextStyleName( LPSTR pszPrevStyleName )

This function returns the next style name in the global style database after the name passed.  When the end of the list of styles is reached, NULL is returned.


T_201647470001
IAALoader->SetSearchDirectory()

HRESULT SetSearchDirectory( LPSTR pszDirectoryName, AAFlags fFlags );

This function sets the default search directory for the style and personality databases.

Valid flags are:

AAF_IGNORE_STANDARD_LOCATION	If this flag is set the default style & personality location is never used - the loader will ONLY find styles and personalities in the directory passed.

RETURN VALUES:

S_OK	The function succeeded.

E_OUTOFMEMORY	Unable to succeed due to low memory.

E_INVALIDARG	One of the arguments passed is invalid.


T_071206110001
IAAEngine->SetPrepareTime()

HRESULT SetPrepareTime( short nPrepareTime )

This functions sets the amount of time ahead that notes are composed and sent to the registered IAAEventSink.  This time is in music time and defaults to the length of one measure.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The prepare time specified is out of range.


T_071206110001
IAAEngine->SetDebug()

HRESULT SetDebug( short nDebug )

This function sets the debug level.  A value of 0 (the default) results in no debugging messages being printed.  A value of 1 (fatal error) through 5 (informational message) indicates messages of thast severity or lower should be printed.  Messages are displayed using OutputDebugString().  A debug value of greater than 0 also enforces very strict runtime data validation in all functions.

RETURN VALUES:

S_OK	The function succeeded.


T_071206110001
IAAEngine->GetEventSink()

LPAAEVENTSINK GetEventSink()

This function returns the IAAEventSink interface registered with this interface.  If this function returns NULL, no IAAEventSink interface has been registered.


T_071206110001
IAAEngine->RegisterEventSink()

HRESULT RegisterEventSink( LPAAEVENTSINK pEventSink )

This function registers a new IAAEventSink with the IAAEngine.  If there is already an IAAEvenSink interface registered, it is released and the new one assigned.

This is where all composed events are funnelled to.  In the simplest case, this interface is one of the ones exported by the IAARealTime interface, so events are directly given to it.  An application may choose to daisy chain IAAEventSink interfaces between IAAEngine and IAARealTime to perform whatever filter operations necessary.

RETURN VALUES:

S_OK	The function succeeded.


T_071206110001
IAAEngine->GetRealTime()

HRESULT LPAAREALTIME GetRealTime()

This function returns the IAARealTme interface registered with this interface.  If this function returns NULL, no IAARealTime interface has been registered.


T_071206110001
IAAEngine->RegisterRealTime()

HRESULT RegisterRealTime( LPAAREALTIME pRealTime )

This function registers a new IAARealTime with the IAAEngine.  If there is already an IAARealTime interface registered, it is released and the new one assigned.

RETURN VALUES:

S_OK	The function succeeded.


T_071354440001
IAARealTime->get_Tempo()

long get_Tempo()

This function returns the tempo in beats per minute as well as a fractional part of 0 to 65535 out of 65536.  In most cases the factional part of the tempo is not necessary or desired and in this case a simple cast to a short or the usage of the TEMPO_BPM( x ) macro will retrieve only the beats per minute portion of the tempo.  The fractional portion of the tempo is stored in the upper 16 bits and may be retrieved using the TEMPO_FRACT( x ) macro.


T_071354440001
IAARealTime->put_Tempo()

HRESULT put_Tempo( long lTempo )

This function sets the current tempo in beats per minute, including a fractional tempo that is a fraction from 0 to 65535 parts out of 65536.  The fractional part of the tempo is stored as the upper 16 bits, so merely passing 120 (for example) to this function will set the tempo to 120 beats per minute.  If a fractional tempo is desired there is a macro MAKE_TEMPO( bpm, fract ) that will arrange the information properly.  Note that the fractional tempo is optional and should only be required when a very high resolution is necessary.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The tempo was out of range.


T_071354440001
IAARealTime->get_TimeSignature()

long get_TimeSignature()

This function returns both the numerator and denominator of the current time signature.  The individual pieces may be retrieved by the use of the TIMESIG_NUMERATOR( x ) and TIMESIG_DENOMINATOR( x ) macros.


T_071354440001
IAARealTime->put_TimeSignature()

HRESULT put_TimeSignature( long lTimeSignature )

This function sets the current time signature.  The time signature is built of two parts, a numerator (beats per measure) and a denominator (which note determines the beat ).  This value may be built using the macro MAKE_TIMESIG( numerator, denominator ),

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The time signature is invalid.


T_071354440001
IAARealTime->get_RelTempo()

short get_RelTempo()

This function returns the current relative tempo, from 0 (half speed) to 200 (double speed) with 100 being the normal speed.


T_071354440001
IAARealTime->put_RelTempo()

HRESULT put_RelTempo( short nRelTempo )

This function sets the relative tempo.  The relative tempo goes from 0 (half speed) to 200 (double speed) with 100 being normal speed.  The relative tempo is always in effect until reset, even when the actual tempo is changed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The relative tempo passed was out of range.


T_071354440001
IAARealTime->get_RelVolume()

short get_RelVolume()

This function retrieves the current relative volume, where 100 is normal, 0 is off/quiet, and 200 is double the normal volume.


T_071354440001
IAARealTime->put_RelVolume()

HRESULT put_RelVolume( short nRelVolume )

This function sets the current relative volume, where 100 is normal, 0 is off/quiet, and 200 is double the normal volume.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The parameter passed is out of range.


T_071354440001
IAARealTime->get_Mutes()

short get_Mutes()

This function returns a short where each bit represents an instrument in the band, one for each of the sixteen band members where the low bit is instrument 1 and the high bit instrument 16.  If a bit is on, then that instrument is muted, otherwise it is not.


T_071354440001
IAARealTime->put_Mutes()

HRESULT put_Mutes( short nMutes )

This function sets the mutes for each of the sixteen instruments.  Each bit in nMutes represents an instrument in the band where the low bit is instrument 1 and the high bit instrument 16.  If a bit is on, then that instrument is muted, otherwise it is not.

RETURN VALUES:

S_OK	The function succeeded.


T_071354440001
IAARealTime->get_MusicTime()

long get_MusicTime()

This function returns the current music time, based on the PPQN.  If there is no music playing, this value will be whatever the last valid music time was, or 0 if music has never played.


T_071354440001
IAARealTime->ResetMusicTime()

HRESULT ResetMusicTime()

This function resets the music time to be 0.

RETURN VALUES:

S_OK	The function succeeded.


T_071354440001
IAARealTime->GetNotifySink()

LPAANOTIFYSINK GetNotifySink()

This function returns a pointer to the registered IAANotifySink interface, or NULL if there is none registered.


T_071354440001
IAARealTime->RegisterNotifySink()

HRESULT RegisterNotifySink( LPAANOTIFYSINK pNotifySink )

This function registers an IAANotifySink interface with the IAARealTime interface.  This interface is implemented by an application to receive callbacks on key events.

RETURN VALUES:

S_OK	The function succeeded.


T_071354440001
IAARealTime->GetClock()

LPCLOCK GetClock()

This function returns the pointer to the currently registered IClock interface, or NULL if there is none.


T_071354440001
IAARealTime->RegisterClock()

HRESULT RegisterClock( LPCLOCK pClock )

This function registers the IClock interface with the IAARealTime interface.  This interface is used to determine the current system time and may be overridden if there is an alternate timing source that is necessary to sync to.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAEventSink->GetEventSink()

LPAAEVENTSINK GetEventSink()

This function returns the current IAAEventSink interface registered, or NULL if there is none.


T_071442480001
IAAEventSink->RegisterEventSink()

HRESULT RegisterEventSink( LPAAEVENTSINK pEventSink )

This function registers an IAAEventSink interface with this IAAEventSink.  In this manner it is possible to daisy-chain IAAEventSinks to perform filtering or any other operation until they reach their ultimate destination.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAEventSink->QueueEvent()

HRESULT QueueEvent( AAEVENT* pEvent )

This function queues an event to be played.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDISink->GetMIDISink()

LPAAMIDISINK GetMIDISink()

This function returns the currently regitered IAAMIDISink interface, or NULL if there is none.


T_071442480001
IAAMIDISink->RegisterMIDISink()

HRESULT RegisterMIDISink( LPAAMIDISINK pMIDISink )

This function registers an IAAMIDISink interface with this IAAMIDISink interface.  In this way, these interfacesmay be daisy-chained to perform filtering or other effects needed.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDISink->PlayMIDIEvent()

HRESULT PlayMIDIEvent( long lMIDIEvent, long lTimeInMils )

This function plays a MIDI event.  The exact timestamp is passed when possible, although a 0 value in this field is valid and indicates that the event is coming in in realtime and should be played as soon as possible.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnSongStarted()

HRESULT OnSongStarted( LPAASONG pSong, long fFlags )

This function is called to notify an application whenever a song is started.  There are currently no valid flags defined for the fFlags field.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnSongEnded()

HRESULT OnSongEnded( LPAASONG pSong, long fFlags, long lEndTime )

This function is called to notify an application whenever a song has ended.

Valid flags in the fFlags field are:

AAF_ENDEDEARLY	This song was stopped before it was complete.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnSectionStarted()

HRESULT OnSectionStarted( LPAASECTION pSection, long fFlags )

This function is called to notify an application whenever a section has started.

Valid flags in the fFlags field are:

AAF_ISTRANSITION	This section is a transition.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnSectionEnded()

HRESULT OnSectionEnded( LPAASECTION pSection, long fFlags, long lEndTime )

This function is called to notify an application whenever a section has ended.

Valid flags in the fFlags field are:

AAF_ISTRANSITION	This section is a transition.

AAF_ENDEDEARLY	This section was stopped before it was complete.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnSectionChanged()

HRESULT OnSectionChanged( LPAASECTION pSection, long fFlags )

This function is called to notify an application whenever a section's data is changed in any way.  There are currently no valid flags defined for the fFlags field.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnNextSection()

HRESULT OnNextSection( LPAASECTION pSection, long fFlags )

This function is called to notify an application that a section is nearing completion and there are no more sections left in the queue.  If the application wants to continue playing music, new sections should be composed and/or queued to play.

There are currently no valid flags defined for the fFlags field.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnEmbellishment()

HRESULT OnEmbellishment( long lEmbellishment, long fFlags )

This function notifies the application that an embellishment has begun to play.  The lEmbellishment parameter may be any ony of the following:

AAC_FILL

AAC_BREAK

AAC_END

AAC_INTRO

There are currently no valid flags defined for the fFlags field.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnGroove()

HRESULT OnGroove( long lGroove, long fFlags )

This function notifies the application when a new groove begins to play.  The lGroove parameter may be any one of the following:

AAC_GROOVE_A

AAC_GROOVE_B

AAC_GROOVE_C

AAC_GROOVE_D

There are currently no valid flags defined for the fFlags field.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnMetronome()

HRESULT OnMetronome( short nMeasure, short nBeat )

This function notifies the application on every beat while music is playing.  The nMeasure and nBeat parameters are relative to the current section only and start at 1.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnMIDIInput()

HRESULT OnMIDIInput( long lMIDIEvent, long lMusicTime )

This function notifies the application every time an event is received by the IAAMIDISink interface of IAARealTime.  The most common cause for this is MIDI input, although an application may send data to this interface as it sees fit.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAANotifySink->OnNotePlayed()

HRESULT OnNotePlayed( AAEVENT* pEvent )

This function notifies the application every time an event is processed and played by the IAARealTime interface.  Only events that have been queued to the IAARealTime interface's IAAEventSink interface will cause this notification.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIIn->Activate()

HRESULT Activate()

This function will claim the MIDI input resource for the use of the current application.  Typically, only one application may claim this resource at a time.  Depending on the driver being used, it may also not be possible to perform other tasks simultaneously with MIDI Input, for example WAVE audio output.

RETURN VALUES:

S_OK	The function succeeded.

E_FAIL	The MIDI In resource is not available.


T_071442480001
IAAMIDIIn->Deactivate()

HRESULT Deactivate()

This function releases the MIDI input resource so that other applications may use it.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIIn->SetDevice()

HRESULT SetDevice( short nDeviceID )

This function sets the current device being used for MIDI input.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nDeviceID is invalid.


T_071442480001
IAAMIDIIn->GetMIDISink()

LPAAMIDISINK GetMIDISink()

This function returns the IAAMIDISink interface that is the recipient of the data generated by the MIDI input device.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIIn->RegisterMIDISink()

HRESULT RegisterMIDISink( LPAAMIDISINK pMIDISink )

This function registers the IAAMIDISink interface that will be the recipient of the data generated by the MIDI input device.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIOut->Activate()

HRESULT Activate()

This function will claim the MIDI output resource for the use of the current application.  Typically, only one application may claim this resource at a time.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIOut->Deactivate()

HRESULT Deactivate()

This function releases the MIDI output resource so that other applications may use it.

RETURN VALUES:

S_OK	The function succeeded.


T_071442480001
IAAMIDIOut->SetDevice()

HRESULT SetDevice( short nDeviceID )

This function sets the current device being used for MIDI output.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nDeviceID is invalid.


T_071442480001
IClock->GetTime()

long GetTime()

This function returns the current system time in milliseconds.


T_071731230001
IAASection->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_071731230001
IAASection->get_Tempo()

long get_Tempo()

This function returns the section's tempo in beats per minute as well as a fractional part of 0 to 65535 out of 65536.  In most cases the factional part of the tempo is not necessary or desired and in this case a simple cast to a short or the usage of the TEMPO_BPM( x ) macro will retrieve only the beats per minute portion of the tempo.  The fractional portion of the tempo is stored in the upper 16 bits and may be retrieved using the TEMPO_FRACT( x ) macro.


T_071731230001
IAASection->put_Tempo()

HRESULT put_Tempo( long lTempo )

This function sets the section's tempo in beats per minute, including a fractional tempo that is a fraction from 0 to 65535 parts out of 65536.  The fractional part of the tempo is stored as the upper 16 bits, so merely passing 120 (for example) to this function will set the tempo to 120 beats per minute.  If a fractional tempo is desired there is a macro MAKE_TEMPO( bpm, fract ) that will arrange the information properly.  Note that the fractional tempo is optional and should only be required when a very high resolution is necessary.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The tempo was out of range.


T_071731230001
IAASection->get_Length()

short get_Length()

This function returns the length of the pattern in measures.  If there is an error, 0 is returned.


T_071731230001
IAASection->put_Length()

HRESULT put_Length( short nLength )

This function sets the length in measures for this section.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nLength parameter is out of acceptable range.


T_071731230001
IAASection->get_LengthInMils()

long get_LengthInMils()

This function returns the length in milliseconds og the section.  Changes in the relative tempo via the IAARealTime interface are not reflected.


T_071731230001
IAASection->get_Style()

LPAASTYLE get_Style()

This function returns a pointer to the style that the section is currently referencing.


T_071731230001
IAASection->put_Style()

HRESULT put_Style( LPAASTYLE pStyle )

This function sets the section's style.  The pointer reference is maintained until explicitly changed or until the section is released.

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->get_Personality()

LPAAPERSONALITY get_Personality()

This function returns a pointer to the personality that the section is referencing.


T_071731230001
IAASection->put_Personality()

HRESULT put_Personality( LPAAPERSONALITY pPersonality )

This function sets the section's personality.  The pointer reference is maintained until explicitly changed or until the section is released.

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->get_Band()

LPAABAND get_Band()

This function returns a pointer to the section's band.  This pointer is guaranteed to remain the same throughout the lifetime of the section.


T_071731230001
IAASection->put_Band()

HRESULT put_Band( LPAABAND pBand )

This function sets the section's band to be equal to the pBand passed.  It will not maintain a reference to the passed pointer, so further operations on the passed band will not be reflected in the section's band.

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->get_Key()

short get_Key()


T_071731230001
IAASection->put_Key()

HRESULT put_Key( short nKey )

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->get_Repeats()

short get_Repeats()


T_071731230001
IAASection->put_Repeats()

HRESULT put_Repeats( short nRepeats )

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->get_UserData()

long get_UserData()


T_071731230001
IAASection->put_UserData()

HRESULT put_UserData( long lUserData )

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASection->Play()

HRESULT Play( long fFlags, long lStartTime )

This function plays the section.  Various flags sent via the fFlags parameter influence how the section is played.  Each of these flags is mutually exclusive - combining them may get unpredictable results.  In all cases if there is no currently playing section, the requested section begins playing immediately regardless of the fFlags parameter.

•	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section (if any) at the next measure boundary to begin playing the requested section.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section (if any) at the next beat boundary to begin playing the requested section.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section (if any) at the next click boundary to begin playing the requested section.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section (if any) immediately to begin playing the requested section.

•	AAF_QUEUE

Usage of this flag will queue the section to play when all currently pending sections have ended.  It is safe to queue the same section more than once.

•	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play so that the requested section will play as soon as the current one is finished.  This does not affect any repeats that the current section has yet to play.

•	AAF_FAIL_IF_PLAYING

Usage of this flag will cause the function to fail (returning E_FAIL) if there is a section currently playing.

The lStartTime parameter determines the offset into the section to begin playing music, in music time (see IAARealTime->get_PPQN()).

RETURN VALUES:

S_OK	The function succeeded.

E_POINTER	An invalid IAASection was passed.

E_INVALIDARG	An invalid flag was passed.

E_FAIL	Failed because a section is already playing.


T_071731230001
IAASection->Stop()

HRESULT Stop( long fFlags )

This function stops the section playing.  If the section is not currently playing, tis function has no effect.  This function does not affect any additional queued copies of this section but does prevent any repeats from occuring.

 •	AAF_NEXT_MEASURE (default)

Usage of this flag stops the section at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag stops the section at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag stops the section at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag stops the section immediately.

RETURN VALUES:

S_OK	The function succeeded.

AAW_NOT_PLAYING	The section could not be stopped because it was not playing.


T_201338100001
IAARealTime->Start()

HRESULT Start()

This function starts the realtime timer.  Music time will advance from whatever its current position is.  If the timer is already running, this function has no effect.

RETURN VALUES

S_OK	The function succeeded

E_FAIL	The timer could not be started


T_201338100001
IAARealTime->Stop()

HRESULT Stop()

This function stops the realtime timer.  Music time will remain at its current position until the timer is restartes or until ResetMusicTime() is called.  If the timer is not running, this function will ahve no effect.

RETURN VALUES

S_OK	The function succeeded


T_201338100001
IAAEngine->IsPlaying()

BOOL IsPlaying()

This function returns TRUE if any music is currently playing, otherwise it returns FALSE.


T_071731230001
IAASection->IsPlaying()

BOOL IsPlaying()

This function returns TRUE if the section is currently playing, otherwise it returns FALSE.


T_071731230001
IAASection->GetData()

HRESULT GetData( AASECTION* pSection )

This function fills in the AASECTION structure passed with data appropriate for this pattern.  Both the cbStructSize and the nSectionType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_071731230001
IAASection->SetData()

HRESULT SetData( AASECTION* pSection )

This function sets the data of the IAASection to conform with the AASECTION structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_071731230001
IAASection->Clone()

LPAASECTION Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_071731230001
IAASection->RemoveFromQueue()

HRESULT RemoveFromQueue()

This function removes the section from the queue of pending sections to play.  If this section is queued multiple times, every reference to it in the queue is removed.

RETURN VALUES:

S_OK	The function succeeded.

AAW_NOTQUEUED	The section is not queued to be played.


T_071731230001
IAASong->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the song.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_071731230001
IAASong->get_Author()

LPSTR get_Author()

This function retrieves the author of the song.  If no author has been defined, NULL will be returned.


T_071731230001
IAASong->put_Author()

HRESULT put_Author( LPSTR pszAuthor )

This function sets the author of the song.

RETURN VALUES:

S_OK	The function succeeded.


T_071731230001
IAASong->get_Length()

short get_Length()

This function returns the length in measures of all of the sections that it owns.


T_071731230001
IAASong->get_LengthInMils()

long get_LengthInMils()

This function retrieves the song's length in milliseconds.  If there are no sections in the song, 0 is returned.  This function does not take into account any relative tempo changes, only each section's base tempo and length.


T_071731230001
IAASong->GetFirstSection()

LPAASECTION GetFirstSection()

This function returns the first section in the list.  If the song contains no sections, NULL will be returned.


T_071731230001
IAASong->GetNextSection()

LPAASECTION GetNextSection( LPAASECTION pSection )

This function returns the next section after pSection in the song's list of sections.  If there are no more sections or if pSection is not a valid section in the song, NULL is returned.


T_071731230001
IAASong->InsertSection()

HRESULT InsertSection( LPAASECTION pPrevSection, LPAASECTION pSection )

This function inserts pSection into the song's list of sections.  If pPrevSection is NULL, then the section is inserted at the beginning of the list.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The section is already part of the song or pPrevSection is not part of the song.


T_071731230001
IAASong->AppendSection()

HRESULT AppendSection( LPAASECTION pSection )

This function appends the passed section to the end of the song's list of sections.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The section is already part of the song.


T_071731230001
IAASong->RemoveSection()

HRESULT ReleaseSection( LPAASECTION pSection )

This function releases the section from the song's list of sections.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The section was NULL or does not belong to the song.


T_071731230001
IAASong->Clone()

LPAASONG Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_071731230001
IAASong->Play()

HRESULT Play( long fFlags, long lStartTime )

This function plays the song.  A song is composed of a sequence of sections which are played in order until completion.  Various flags sent via the fFlags parameter influence how the song is played.  Each of these flags is mutually exclusive - combining them may get unpredictable results.  In all cases if there is no currently playing section, the requested song begins playing immediately regardless of the fFlags parameter.

•	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section (if any) at the next measure boundary to begin playing the requested song.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section (if any) at the next beat boundary to begin playing the requested song.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section (if any) at the next click boundary to begin playing the requested song.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section (if any) immediately to begin playing the requested song.

 •	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play so that the requested song will play as soon as the current section is finished.  This does not affect any repeats that the current section has yet to play.

•	AAF_FAIL_IF_PLAYING

Usage of this flag will cause the function to fail (returning E_FAIL) if there is a section currently playing.

The lStartTime parameter determines the offset into the song to begin playing music, in music time (see IAARealTime->get_PPQN()).

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	An invalid flag was passed.

E_FAIL	Failed because a section is already playing.


T_071731230001
IAASong->Stop()

HRESULT Stop( long fFlags )

This function stops the song if it is playing.  If the song is not playing, it has no effect.

 •	AAF_NEXT_MEASURE (default)

Usage of this flag stops the currently playing section at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag stops the currently playing section at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag stops the currently playing section at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag stops the currently playing section immediately.

•	AAF_NEXT_SECTION

Usage of this flag will flush all pending sections queued to play.  This does not affect any repeats that the current section has yet to play.  This flag acts just like IAAEngine->FlushSectionQueue().

RETURN VALUES:

S_OK	The function succeeded.

AAW_NOT_PLAYING	The motif could not be stopped because it was not playing.


T_071731230001
IAASong->IsPlaying()

VARIANT_BOOL IsPlaying()

This function returns TRUE if the song is currently playing, otherwise it returns FALSE.


T_071731230001
IAASong->GetData()

HRESULT GetData( AASONG* pSong )

This function fills in the AASONG structure passed with data appropriate for this pattern.  Both the cbStructSize and the nSongType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_071731230001
IAASong->SetData()

HRESULT SetData( AASONG* pSong )

This function sets the data of the IAASong to conform with the AASONG structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_080935530001
IAAMotif->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_080935530001
IAAMotif->get_Length()

short get_Length()

This function returns the length of the motif in measures.  If there is an error, 0 is returned.


T_080935530001
IAAMotif->put_Length()

HRESULT put_Length( short nLength )

This function sets the length in measures for this motif.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nLength parameter is out of acceptable range.


T_080935530001
IAAMotif->get_Band()

LPAABAND get_Band()

This function returns a pointer to the motif's band.  This pointer is guaranteed to remain the same throughout the lifetime of the motif.


T_080935530001
IAAMotif->put_Band()

HRESULT put_Band( LPAABAND pBand )

This function sets the motif's band to be equal to the pBand passed.  It will not maintain a reference to the passed pointer, so further operations on the passed band will not be reflected in the motif's band.

RETURN VALUES:

S_OK	The function succeeded.


T_080935530001
IAAMotif->get_BeatsPerMeasure()

short get_BeatsPerMeasure()

This function returns the number of beats per measure for this motif.  This value is defined by the owning style and may not be changed directly.


T_080935530001
IAAMotif->get_ClicksPerBeat()

short get_ClicksPerBeat()

This function returns the number of clicks per beat for this pattern.  This value is defined by the owning style and may not be changed directly.


T_080935530001
IAAMotif->Play()

HRESULT Play( long fFlags )

This function plays the motif.  A motif will only play if music is already playing.  A motif is very similar to a pattern - it may have variations and it plays transposed to the current key and chord.  By default, a motif can not overlap itself.  A playing motif must come to an end before the same motif may be played again.

The following flags are mutually exclusive.  Combining them may yield unpredictable results.

•	AAF_NEXT_MEASURE (default)

Usage of this flag plays the motif at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag plays the motif at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag plays the motif at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag plays the motif immediately.

The following flags may be combined as necessary.

•	AAF_ALLOW_OVERLAP

Usage of this flag will allow the motif to overlap itself, i.e. multiple copies of the same motif may be playing at the same time.

•	AAF_PLAY_WITH_STYLE

Usage of this flag ignores the motif's band and plays the motif with the currently playing style's band.  Also, instead of dynamically allocating unused MIDI channels, the channels of the style are used as well.

•	AAF_IGNORE_KEY

Usage of this flag plays the motif in the key it was designed in rather than the current key.  The motif will still be transposed to fit the current chord in the motif's key.

•	AAF_IGNORE_CHORD

Usage of this flag plays the motif in the chord it was designed in rather changing to fit the current chord.  The motif will still be transposed to fit the current key.

RETURN VALUES:

S_OK	The function succeeded.

AAE_NOMUSICPLAYING	The motif cannot play because there is no music playing.

AAE_ALREADYPLAYING	The motif is already playing and the AAF_ALLOW_OVERLAP flag has not been set.


T_080935530001
IAAMotif->Stop()

HRESULT Stop( long fFlags )

This function stops the playing the motif.  It has no effect on any other playing motifs or sections.

 •	AAF_NEXT_MEASURE (default)

Usage of this flag stops the motif at the next measure boundary.

•	AAF_NEXT_BEAT

Usage of this flag stops the motif at the next beat boundary.

•	AAF_NEXT_CLICK

Usage of this flag stops the motif at the next click boundary.

•	AAF_IMMEDIATE

Usage of this flag stops the motif section immediately.

RETURN VALUES:

S_OK	The function succeeded.

AAW_NOT_PLAYING	The motif could not be stopped because it was not playing.


T_080935530001
IAAMotif->IsPlaying()

VARIANT_BOOL IsPlaying()

This function returns TRUE if the motif is currently playing, otherwise it returns FALSE.


T_080935530001
IAAMotif->Clone()

LPAAMOTIF Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_080935530001
IAAMotif->GetData()

HRESULT GetData( AAMOTIF* pMotif )

This function fills in the AAMOTIF structure passed with data appropriate for this pattern.  Both the cbStructSize and the nMotifType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_080935530001
IAAMotif->SetData()

HRESULT SetData( AAMOTIF* pMotif )

This function sets the data of the IAAMotif to conform with the AAMOTIF structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_080935530001
IAAStyle->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_080935530001
IAAStyle->get_BeatsPerMeasure()

short get_BeatsPerMeasure()

This function returns the number of beats per measure for this style.


T_080935530001
IAAStyle->put_BeatsPerMeasure()

HRESULT put_BeatsPerMeasure( short nBeatsPerMeasure )

This function sets the number of beats per measure for this style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument passed is out of range.


T_080935530001
IAAStyle->get_ClicksPerBeat()

short get_ClicksPerBeat()

This function returns the style's number of clicks per beat.


T_080935530001
IAAStyle->put_ClicksPerBeat()

HRESULT put_ClicksPerBeat( short nClicksPerBeat )

This function sets the number of clicks per beat for this style.  This is equivalent to grid resolution in SuperJAM.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument passed is out of range.


T_080935530001
IAAStyle->get_DefaultTempo()

long get_DefaultTempo()

This function returns the default tempo for this style in beats per minute as well as a fractional part of 0 to 65535 out of 65536.  In most cases the factional part of the tempo is not necessary or desired and in this case a simple cast to a short or the usage of the TEMPO_BPM( x ) macro will retrieve only the beats per minute portion of the tempo.  The fractional portion of the tempo is stored in the upper 16 bits and may be retrieved using the TEMPO_FRACT( x ) macro.


T_080935530001
IAAStyle->put_DefaultTempo()

HRESULT put_DefaultTempo( long lTempo )

This function sets the default tempo for this style in beats per minute, including a fractional tempo that is a fraction from 0 to 65535 parts out of 65536.  The fractional part of the tempo is stored as the upper 16 bits, so merely passing 120 (for example) to this function will set the tempo to 120 beats per minute.  If a fractional tempo is desired there is a macro MAKE_TEMPO( bpm, fract ) that will arrange the information properly.  Note that the fractional tempo is optional and should only be required when a very high resolution is necessary.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The tempo passed is out of range.


T_080935530001
IAAStyle->GetFirstBand()

LPAABAND GetFirstBand()

This function returns the first band in the style's list of bands.  If the list is empty, NULL is returned.


T_080935530001
IAAStyle->GetNextBand()

LPAABAND GetNextBand( LPAABAND pBand )

This function returns the next band in the list of bands that belong to the style after the one passed.  If the end of the list has been reached, NULL is returned.


T_080935530001
IAAStyle->AddBand()

HRESULT AddBand( LPAABAND pBand )

This function adds a band to a style.  This function will create a clone of the band passed to add to the styles list of bands.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument is NULL.

E_OUTOFMEMORY	The band could not be cloned.


T_080935530001
IAAStyle->ReleaseBand()

HRESULT ReleaseBand( LPAABAND pBand )

This function releases the band from the style, making it no longer associated with the style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The band passed is invalid or does not belong to this style.


T_080935530001
IAAStyle->GetDefaultBand()

LPAABAND GetDefaultBand()

This function returns the default band for the style.  If the style has no associated bands or if no band has been designated to be the default, NULL is returned.


T_080935530001
IAAStyle->SetDefaultBand()

HRESULT SetDefaultBand( LPAABAND pBand )

This function designates the passed band to be the default for this style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The band passed is invalid or does not belong to this style.


T_080935530001
IAAStyle->get_Band()

LPAABAND get_Band( LPSTR pszName )

This function retrieves the band associated with this style with the requested name.  If an appropriate band could not be found, NULL is returned.


T_081407510001
IAAStyle->GetFirstPersonality()

LPAAPERSONALITY GetFirstPersonality()

This function returns the first personality in the style's list of personalities.  If the list is empty, NULL is returned.


T_081407510001
IAAStyle->GetNextPersonality()

LPAAPERSONALITY GetNextPersonality( LPAAPERSONALITY pPersonality )

This function returns the next personality in the list of personality that belong to the style after the one passed.  If the end of the list has been reached, NULL is returned.


T_081407510001
IAAStyle->AddPersonality()

HRESULT AddPersonality( LPAAPERSONALITY pPersonality )

This function adds a personality to a style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument is NULL.


T_081407510001
IAAStyle->ReleasePersonality()

HRESULT ReleasePersonality( LPAAPERSONALITY pPersonality )

This function releases the personality from the style, making it no longer associated with the style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The personality passed is invalid or does not belong to this style.


T_081407510001
IAAStyle->GetDefaultPersonality()

LPAAPERSONALITY GetDefaultPersonality()

This function returns the default personality for the style.  If the style has no associated personalities or if no personality has been designated to be the default, NULL is returned.


T_081407510001
IAAStyle->SetDefaultPersonality()

HRESULT SetDefaultPersonality( LPAAPERSONALITY pPersonality )

This function designates the passed personality to be the default for this style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The personality passed is invalid or does not belong to this style.


T_081407510001
IAAStyle->get_Personality()

LPAAPERSONALITY get_Personality( LPSTR pszName )

This function retrieves the personality associated with this style with the requested name.  If an appropriate personality could not be found, NULL is returned.


T_081407510001
IAAStyle->GetFirstMotif()

LPAAMOTIF GetFirstMotif()

This function returns the first motif in the style's list of motifs.  If the list is empty, NULL is returned.


T_081407510001
IAAStyle->GetNextMotif()

LPAAMOTIF GetNextMotif( LPAAMOTIF pMotif )

This function returns the next motif in the list of motifs that belong to the style after the one passed.  If the end of the list has been reached, NULL is returned.


T_081407510001
IAAStyle->AddMotif()

HRESULT AddMotif( LPAAMOTIF pMotif )

This function adds a motif to a style.  This function will fail if the motif passed already belongs to a style - it must be released from the original style before being added to a new style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument is NULL or already belongs to a style.


T_081407510001
IAAStyle->ReleaseMotif()

HRESULT ReleaseMotif( LPAAMOTIF pMotif )

This function releases the motif from the style, making it no longer associated with the style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The motif passed is invalid or does not belong to this style.


T_081407510001
IAAStyle->get_Motif()

LPAAMOTIF get_Motif( LPSTR pszName )

This function retrieves the motif associated with this style with the requested name.  If an appropriate motif could not be found, NULL is returned.


T_081407510001
IAAStyle->GetFirstPattern()

LPAAPATTERN GetFirstPattern()

This function returns the first pattern in the style's list of patterns.  If the list is empty, NULL is returned.


T_081407510001
IAAStyle->GetNextPattern()

LPAAPATTERN GetNextPattern( LPAAPATTERN pPattern )

This function returns the next pattern in the list of patterns that belong to the style after the one passed.  If the end of the list has been reached, NULL is returned.


T_081407510001
IAAStyle->AddPattern()

HRESULT AddPattern( LPAAPATTERN pPattern )

This function adds a pattern to a style.  This function will fail if the pattern passed already belongs to a style - it must be released from the original style before being added to a new style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The argument is NULL or already belongs to a style.


T_081407510001
IAAStyle->ReleasePattern()

HRESULT ReleasePattern( LPAAPATTERN pPattern )

This function releases the pattern from the style, making it no longer associated with the style.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pattern passed is invalid or does not belong to this style.


T_081407510001
IAAStyle->get_Pattern()

LPAAPATTERN get_Pattern( LPSTR pszName )

This function retrieves the pattern associated with this style with the requested name.  If an appropriate pattern could not be found, NULL is returned.


T_081407510001
IAAStyle->Clone()

LPAASTYLE Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_081407510001
IAAStyle->GetData()

HRESULT GetData( AASTYLE* pStyle )

This function fills in the AASTYLE structure passed with data appropriate for this pattern.  Both the cbStructSize and the nStyleType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_081407510001
IAAStyle->SetData()

HRESULT SetData( AASTYLE* pStyle )

This function sets the data of the IAAStyle to conform with the AASTYLE structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_081407510001
IAAPersonality->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_081407510001
IAAPersonality->Clone()

LPAAPERSONALITY Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_081407510001
IAAPersonality->GetData()

HRESULT GetData( AAPERSONALITY* pPersonality )

This function fills in the AAPERSONALITY structure passed with data appropriate for this pattern.  Both the cbStructSize and the nPersonalityType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_081407510001
IAAPersonality->SetData()

HRESULT SetData( AAPERSONALITY* pPersonality )

This function sets the data of the IAAPersonality to conform with the AAPERSONALITY structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_081407510001
IAABand->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_081407510001
IAABand->get_Volume()

short get_Volume( short nInstrument )

This function retrieves the volume for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument is out of range


T_081407510001
IAABand->put_Volume()

HRESULT put_Volume( short nInstrument, short nVolume )

This function sets the volume for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.  Valid values for nVolume are 0 - 127.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument or patch number is out of range


T_081407510001
IAABand->get_Pan()

short get_Pan( short nInstrument )

This function retrieves the pan value for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument is out of range


T_081407510001
IAABand->put_Pan()

HRESULT put_Pan( short nInstrument, short nPan )

This function sets the pan number for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.  Valid values for nPan are -64 (hard left) - 63 (hard right).

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument or patch number is out of range


T_081407510001
IAABand->get_Patch()

short get_Patch( short nInstrument )

This function retrieves the patch number for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument is out of range


T_081407510001
IAABand->put_Patch()

HRESULT put_Patch( short nInstrument, short nPatch )

This function sets the patch number for the specified instrument.  Valid values for nInstrument are 0 - 15, representing each of the 16 instruments.  Valid values for nPatch are 0 - 127.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The instrument or patch number is out of range


T_081407510001
IAABand->Clone()

LPAABAND Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_081407510001
IAABand->GetData()

HRESULT GetData( AABAND* pBand )

This function fills in the AABAND structure passed with data appropriate for this pattern.  Both the cbStructSize and the nBandType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_081407510001
IAABand->SetData()

HRESULT SetData( AABAND* pBand )

This function sets the data of the IAABand to conform with the AABAND structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_081407510001
IAATemplate->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the template.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_081407510001
IAATemplate->get_Length()

short get_Length()

This function returns the length of the template in measures.  If there is an error, 0 is returned.


T_081407510001
IAATemplate->put_Length()

HRESULT put_Length( short nLength )

This function sets the length in measures for this template.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nLength parameter is out of acceptable range.


T_081407510001
IAATemplate->Clone()

LPAATEMPLATE Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_081407510001
IAATemplate->GetData()

HRESULT GetData( AATEMPLATE* pTemplate )

This function fills in the AATEMPLATE structure passed with data appropriate for this pattern.  Both the cbStructSize and the nTemplateType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_081407510001
IAATemplate->SetData()

HRESULT SetData( AATEMPLATE* pTemplate )

This function sets the data of the IAATemplate to conform with the AATEMPLATE structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_081407510001
IAAPattern->put_Name()

HRESULT put_Name( LPSTR pszName )

This function sets the name of the pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The name passed is NULL.


T_081407510001
IAAPattern->get_Length()

short get_Length()

This function returns the length of the pattern in measures.  If there is an error, 0 is returned.


T_081407510001
IAAPattern->put_Length()

HRESULT put_Length( short nLength )

This function sets the length in measures for this pattern.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The nLength parameter is out of acceptable range.


T_081407510001
IAAPattern->get_BeatsPerMeasure()

short get_BeatsPerMeasure()

This function returns the number of beats per measure for this pattern.  This value is defined by the owning style and may not be changed directly.


T_081407510001
IAAPattern->get_ClicksPerBeat()

short get_ClicksPerBeat()

This function returns the number of clicks per beat for this pattern.  This value is defined by the owning style and may not be changed directly.


T_081407510001
IAAPattern->Clone()

LPAAPATTERN Clone()

This function returns a new interface that is a duplicate of the current interface.  If there is an error, NULL will be returned.


T_081407510001
IAAPattern->GetData()

HRESULT GetData( AAPATTERN* pPattern )

This function fills in the AAPATTERN structure passed with data appropriate for this pattern.  Both the cbStructSize and the nPatternType fields must be filled in with valid values before this function is called.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The structure passed is NULL or is not initialized correctly.


T_081407510001
IAAPattern->SetData()

HRESULT SetData( AAPATTERN* pPattern )

This function sets the data of the IAAPattern to conform with the AAPATTERN structure passed.

RETURN VALUES:

S_OK	The function succeeded.

E_INVALIDARG	The pointer passed is NULL or the structure has an invalid type or structure length.


T_131638450001
IAARealTime->FlushEventsAfterTime()

HRESULT FlushEventsAfterTime( long lTime )

This function will flush all events in the queue that are timestamped later than lTime unless the event has the AAF_DONTFLUSH flag set.

RETURN VALUES:

S_OK	The function succeeded.


Glossary

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z