| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- $#include "SoundSource.h"
- enum SoundType{};
- class SoundSource : public Component
- {
- void Play(Sound* sound);
- void Play(Sound* sound, float frequency);
- void Play(Sound* sound, float frequency, float gain);
- void Play(Sound* sound, float frequency, float gain, float panning);
- void Stop();
- void SetSoundType(SoundType type);
- void SetFrequency(float frequency);
- void SetGain(float gain);
- void SetAttenuation(float attenuation);
- void SetPanning(float panning);
- void SetAutoRemove(bool enable);
- // void SetPlayPosition(signed char* pos);
-
- Sound* GetSound() const;
- // volatile signed char* GetPlayPosition() const;
- SoundType GetSoundType() const;
- float GetTimePosition() const;
- float GetFrequency() const;
- float GetGain() const;
- float GetAttenuation() const;
- float GetPanning() const;
- bool GetAutoRemove() const;
- bool IsPlaying() const;
-
- void PlayLockless(Sound* sound);
- void StopLockless();
- void SetPlayPositionLockless(signed char* position);
- void Mix(int* dest, unsigned samples, int mixRate, bool stereo, bool interpolation);
-
- tolua_readonly tolua_property__get_set Sound* sound;
- tolua_property__get_set SoundType soundType;
- tolua_readonly tolua_property__get_set float timePosition;
- tolua_property__get_set float frequency;
- tolua_property__get_set float gain;
- tolua_property__get_set float attenuation;
- tolua_property__get_set float panning;
- tolua_property__get_set bool autoRemove;
- tolua_readonly tolua_property__is_set bool playing;
- };
|