SoundSource.pkg 1.3 KB

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