Usually Annette, you can tell what needs to be done by looking at the objects superclass
in this case, if you look at the .h file you can see @interface Sound : NSObject
Sound is the name of this Class, NSObject is our superclass
the initWithPath method is returning itself and does a [super init] meaning that it calls the parents init method.
In order for you to call this methods theres one of two ways.
You can have a property that you manage lets say, in your delegate.
@class Sound;
@interface ScanViewController : UIViewController {
Sound *aSound;
}
@property (nonatomic, retain) Sound *aSound;
then somwhere in your delegate
- (void) someFunction() {
aSound = [[Sound alloc] initWithPath:@"pathtoSound"];
}
If you didnt want it to be a property you can easily create a new Sound object anywhere in a .m file like so.
Sound *mySound = [[Sound alloc] initWithPath:@"pathtoSound"];
If you wanted multiple sounds, Store them in a Sound Array
P.S. dont forget to release these objects since you alloc'ed them.