Sha256: a46e1c68fec73a029b15d728482a394778707a9708556a4b7530a67016260452
Contents?: true
Size: 774 Bytes
Versions: 3
Compression:
Stored size: 774 Bytes
Contents
#import <Cocoa/Cocoa.h> #import <Gosu/Audio.hpp> #import <Gosu/Utility.hpp> #import <Gosu/Window.hpp> @interface ObjGosuSample : NSObject { Gosu::Sample* _sample; } @end @implementation ObjGosuSample - (id)initWithWindow:(id)window filename:(NSString*)filename { if (not (self = [super init])) return NULL; _sample = new Gosu::Sample(((Gosu::Window*)[[window _objcObject] _cppObject])->audio(), Gosu::widen([filename UTF8String])); return self; } - (void)playWithVolume: (float)volume speed:(float)speed looping:(BOOL)looping { _sample->play(volume, speed, looping); } - (void)playWithPan: (float)pan volume: (float)volume speed:(float)speed looping:(BOOL)looping { _sample->playPan(pan, volume, speed, looping); } @end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gosu-0.7.18 | GosuImpl/ObjGosu/ObjGosuSample.mm |
gosu-0.7.17 | GosuImpl/ObjGosu/ObjGosuSample.mm |
gosu-0.7.16 | GosuImpl/ObjGosu/ObjGosuSample.mm |