SoundSource.pkg 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. $#include "SoundSource.h"
  2. enum SoundType{};
  3. class SoundSource : public Component
  4. {
  5. void Play(Sound* sound);
  6. void Play(Sound* sound, float frequency);
  7. void Play(Sound* sound, float frequency, float gain);
  8. void Play(Sound* sound, float frequency, float gain, float panning);
  9. void Stop();
  10. void SetSoundType(SoundType type);
  11. void SetFrequency(float frequency);
  12. void SetGain(float gain);
  13. void SetAttenuation(float attenuation);
  14. void SetPanning(float panning);
  15. void SetAutoRemove(bool enable);
  16. Sound* GetSound() const;
  17. SoundType GetSoundType() const;
  18. float GetTimePosition() const;
  19. float GetFrequency() const;
  20. float GetGain() const;
  21. float GetAttenuation() const;
  22. float GetPanning() const;
  23. bool GetAutoRemove() const;
  24. bool IsPlaying() const;
  25. tolua_readonly tolua_property__get_set Sound* sound;
  26. tolua_property__get_set SoundType soundType;
  27. tolua_readonly tolua_property__get_set float timePosition;
  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__is_set bool playing;
  34. };