#pragma once #include "Node.h" #include "Vector.h" #include "fmod.h" #include class SoundNode : public Node { public: SoundNode(void); ~SoundNode(void); bool loadFile(std::string filename, bool loop); void play(); void stop(); FSOUND_SAMPLE* getSample(); int getChannel(); void update(float dt); void setKillSoundNodeAfterPlayed(bool _kill); float getTimeToPlay(); void setVolume(float _vol); void setSceneAlpha(float _alpha); virtual void killMe(); void setPosition(Vector &_pos); virtual Node* clone(); protected: bool loop; bool kill; bool playing; FSOUND_SAMPLE *soundSample; int channel; float timeToPlaySample; float vol; Vector vel; Vector oldPos; };