Release 3.0, Copyright ©1998 by Sean Luke. All Rights Reserved.
Module
Subclass Of: NSObject
Declared In: Module.h
Class Description
All modules you create should subclass from Module. Module contains two data items that are defined when the instance is initialized:
moduleController is the instance that "speaks" to modules, using the protocol ModuleProtocol You don't need to know anything more about the Module Controller other than that it is responsible for loading, maintaining, and communicating with modules, and that it is your gateway to communicating with Resound. You send messages to and receive messages from TheModuleController in order to manipulate sound information in Resound.
rootModuleMenuNode is the root node of your node tree for menu items you want to create in Resound's Modules menu. This is initially set to NULL--you are responsible for setting it a ModuleMenuNode, and setting up that node and its subnodes. For more information on this, see ModuleMenuNode.h . Always set up menu node information by overriding init, but remember to call [super init] first.
There are three chief methods in Module:
init: where you set up your ModuleMenuNode. See above.
setModuleControllerTo: Resound calls this to set up TheModuleController. You should ignore this call.
getModuleMenuNode: Resound calls this to get your ModuleMenuNode. It is called soon after init:, so be sure to have your node set up by then.
In addition, Module provides overridable auxillary methods to automatically inform your module about changes in the system.
Instance Variables
#define TheModuleController moduleController
#define TheModuleMenuNode rootModuleMenuNode
id <ModuleProtocol> moduleController;
id rootModuleMenuNode;
moduleController The Module's interface object to Resound.
moduleMenuNode The root ModuleMenuNode for the Module.
Method Types
Object Maintenance - dealloc
- init
Informing the Module - soundDidChange
- nowPlaying
- nowRecording
- didPlay
- didRecord
Instance Methods
dealloc
- (void) dealloc
Frees the Module. This also frees TheModuleMenuNode and all of its subsidiary ModuleMenuNodes you have set up; you don't have to free them yourself.
didPlay
- didPlay
Informs the module that a sound has just finished playing.
didRecord
- didRecord
Informs the module that a sound has just finished recording.
init
- init
Initializes the Module. You should override this method to set up your ModuleMenuNodes. Be certain to call [super init] before anything else.
nowPlaying
- nowPlaying
Informs the module that a sound is now playing.
nowRecording
- nowRecording
Informs the module that a sound is now recording.
soundDidChange
- soundDidChange
Informs the module that the current sound may have changed. Note: This may be called twice for the same sound change.