- Declared In:
- SoundPackProtocol.h
- + canLoad
- - soundPackName
- - availableSounds
- - isValid
- - setIsValid:
- - checksumForSound:
- - class
+ (BOOL)canLoad
In this class method, you can perform any checks to determine if you should in fact load. This will almost always return YES, but is provided for added flexibility. If this returns NO, the Sound Pack will not be loaded.
- (NSArray *)availableSounds
This method should return a nil-terminated array of filenames. The file names should be 'clear', since MooSB simply removes the filename extensions (.wav, .aif) and displays the result in the UI.
- (NSString *)checksumForSound:(NSString *)sound
This function will be passed one of the strings returned from -(NSArray *)availableSounds. This function must return the _expected_ md5 checksum for the sound. That is, the one you calculated before compiling. Use the command 'md5 -q filename' in Terminal to calculate a checksum. Make sure you return _something_, even if the sound name passed in turns out to be invalid.
- (Class)class
This should return your princple class.
- (BOOL)isValid
This should return a variable that is set using -(void)setIsValid:(BOOL)validity;
- (void)setIsValid:(BOOL)validity
This function should set the variable that is returned by -(BOOL)isValid;
- (NSString *)soundPackName
This is the Sound Pack name that will be displayed in the MooSB UI. This name should be unique, since MooSB will not load two Sound Packs with the same name.