SoundSource.pkg 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $#include "Audio/SoundSource.h"
  2. // The actual enum is defined in Scene/Component.pkg
  3. enum AutoRemoveMode {};
  4. class SoundSource : public Component
  5. {
  6. void Seek(float seekTime);
  7. void Play(Sound* sound);
  8. void Play(Sound* sound, float frequency);
  9. void Play(Sound* sound, float frequency, float gain);
  10. void Play(Sound* sound, float frequency, float gain, float panning);
  11. void Stop();
  12. void SetSoundType(const String type);
  13. void SetFrequency(float frequency);
  14. void SetGain(float gain);
  15. void SetAttenuation(float attenuation);
  16. void SetPanning(float panning);
  17. void SetAutoRemoveMode(AutoRemoveMode mode);
  18. Sound* GetSound() const;
  19. String GetSoundType() const;
  20. float GetTimePosition() const;
  21. float GetFrequency() const;
  22. float GetGain() const;
  23. float GetAttenuation() const;
  24. float GetPanning() const;
  25. AutoRemoveMode GetAutoRemoveMode() const;
  26. bool IsPlaying() const;
  27. tolua_readonly tolua_property__get_set Sound* sound;
  28. tolua_property__get_set String soundType;
  29. tolua_readonly tolua_property__get_set float timePosition;
  30. tolua_property__get_set float frequency;
  31. tolua_property__get_set float gain;
  32. tolua_property__get_set float attenuation;
  33. tolua_property__get_set float panning;
  34. tolua_property__get_set AutoRemoveMode autoRemoveMode;
  35. tolua_readonly tolua_property__is_set bool playing;
  36. };