Sound.pkg 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. $#include "Sound.h"
  2. class Sound : public Resource
  3. {
  4. Sound(Context* context);
  5. ~Sound();
  6. bool LoadRaw(Deserializer& source);
  7. bool LoadWav(Deserializer& source);
  8. bool LoadOggVorbis(Deserializer& source);
  9. void SetSize(unsigned dataSize);
  10. void SetData(const void* data, unsigned dataSize);
  11. void SetFormat(unsigned frequency, bool sixteenBit, bool stereo);
  12. void SetLooped(bool enable);
  13. void SetLoop(unsigned repeatOffset, unsigned endOffset);
  14. void FixInterpolation();
  15. float GetLength() const;
  16. unsigned GetDataSize() const;
  17. unsigned GetSampleSize() const;
  18. float GetFrequency();
  19. unsigned GetIntFrequency();
  20. bool IsLooped() const;
  21. bool IsSixteenBit() const;
  22. bool IsStereo() const;
  23. bool IsCompressed() const;
  24. tolua_readonly tolua_property__get_set float length;
  25. tolua_readonly tolua_property__get_set unsigned dataSize;
  26. tolua_readonly tolua_property__get_set unsigned sampleSize;
  27. tolua_readonly tolua_property__get_set float frequency;
  28. tolua_readonly tolua_property__get_set int intFrequency;
  29. tolua_property__is_set bool looped;
  30. tolua_readonly tolua_property__is_set bool sixteenBit;
  31. tolua_readonly tolua_property__is_set bool stereo;
  32. tolua_readonly tolua_property__is_set bool compressed;
  33. };