SoundSource.pkg 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // void SetPlayPosition(signed char* pos);
  17. Sound* GetSound() const;
  18. // volatile signed char* GetPlayPosition() const;
  19. SoundType GetSoundType() const;
  20. float GetTimePosition() const;
  21. float GetFrequency() const;
  22. float GetGain() const;
  23. float GetAttenuation() const;
  24. float GetPanning() const;
  25. bool GetAutoRemove() const;
  26. bool IsPlaying() const;
  27. void PlayLockless(Sound* sound);
  28. void StopLockless();
  29. void SetPlayPositionLockless(signed char* position);
  30. void Mix(int* dest, unsigned samples, int mixRate, bool stereo, bool interpolation);
  31. tolua_readonly tolua_property__get_set Sound* sound;
  32. tolua_property__get_set SoundType soundType;
  33. tolua_readonly tolua_property__get_set float timePosition;
  34. tolua_property__get_set float frequency;
  35. tolua_property__get_set float gain;
  36. tolua_property__get_set float attenuation;
  37. tolua_property__get_set float panning;
  38. tolua_property__get_set bool autoRemove;
  39. tolua_readonly tolua_property__is_set bool playing;
  40. };