Sha256: ff26b2bd10b7f6d107ee1b671c69e7604c80b277a275dc29571813d40cda7bca
Contents?: true
Size: 878 Bytes
Versions: 4
Compression:
Stored size: 878 Bytes
Contents
#include <Gosu/Audio.hpp> #include <Gosu/Sample.h> extern "C" { Gosu_Sample *Gosu_Sample_create(const char *filename) { return reinterpret_cast<Gosu_Sample *>( new Gosu::Sample(filename) ); } void Gosu_Sample_destroy(Gosu_Sample *sample) { delete( reinterpret_cast<Gosu::Sample *>( sample ) ); } Gosu_Channel *Gosu_Sample_play(Gosu_Sample *sample, double volume, double speed, bool looping) { Gosu::Channel channel = reinterpret_cast<Gosu::Sample *>( sample )->play(volume, speed, looping); return reinterpret_cast<Gosu_Channel *>( new Gosu::Channel(channel) ); } Gosu_Channel *Gosu_Sample_play_pan(Gosu_Sample *sample, double pan, double volume, double speed, bool looping) { Gosu::Channel channel = reinterpret_cast<Gosu::Sample *>( sample )->play_pan(pan, volume, speed, looping); return reinterpret_cast<Gosu_Channel *>( new Gosu::Channel(channel) ); } }
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gosu-1.0.0 | src/SampleWrapper.cpp |
gosu-1.0.0.pre2 | src/SampleWrapper.cpp |
gosu-1.0.0.pre1 | src/SampleWrapper.cpp |
gosu-0.15.2 | src/SampleWrapper.cpp |