SoundSource.pkg 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $#include "SoundSource.h"
  2. class SoundSource : public Component
  3. {
  4. public:
  5. // Methods:
  6. void Play(Sound* sound);
  7. void Play(Sound* sound, float frequency);
  8. void Play(Sound* sound, float frequency, float gain);
  9. void Play(Sound* sound, float frequency, float gain, float panning);
  10. void Stop();
  11. void SetSoundType(SoundType type);
  12. SoundType GetSoundType() const;
  13. void SetFrequency(float frequency);
  14. float GetFrequency() const;
  15. void SetGain(float gain);
  16. float GetGain() const;
  17. void SetAttenuation(float attenuation);
  18. float GetAttenuation() const;
  19. void SetPanning(float panning);
  20. float GetPanning() const;
  21. void SetAutoRemove(bool enable);
  22. bool GetAutoRemove() const;
  23. Sound* GetSound() const;
  24. float GetTimePosition() const;
  25. bool IsPlaying() const;
  26. // Properties:
  27. tolua_property__get_set SoundType soundType;
  28. tolua_property__get_set float frequency;
  29. tolua_property__get_set float gain;
  30. tolua_property__get_set float attenuation;
  31. tolua_property__get_set float panning;
  32. tolua_property__get_set bool autoRemove;
  33. tolua_readonly tolua_property__get_set Sound* sound;
  34. tolua_readonly tolua_property__get_set float timePosition;
  35. tolua_readonly tolua_property__is_set bool playing;
  36. };