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