Meteor2D  dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
audioplayable.h
1#pragma once
2#include <irrKlang.h>
3#include <entities/entity.h>
4#include <audio/audioplaystate.h>
5
6namespace meteor {
7#ifndef AUDIOPLAYABLE_H
8#define AUDIOPLAYABLE_H
9 class MAudioClip;
15 public:
21 long getLength();
25 void prepare();
29 void play();
33 void pause();
37 void reset();
41 bool isLooped();
46 void setIsLooped(bool loop);
50 float getVolume();
55 void setVolume(float volume);
59 bool isPaused();
68 void setPlaybackSpeed(float val);
69 private:
75 MAudioPlayable(irrklang::ISoundEngine* engine, irrklang::ISoundSource* soundSrc);
76
77 irrklang::ISound* playableRef=NULL;
78 irrklang::ISoundSource* soundSrc=NULL;
79 irrklang::ISoundEngine* engine=NULL;
80 EAudioPlayableState currState = EAudioPlayableState::PLAYABLE_INIT;
81
82 friend class MAudioClip;
83 };
84#endif
85}
AudioClip is the instance of a audio clip file, this class holds. This class holds basic information ...
Definition audioclip.h:16
This class is the Playable instance of AudioClip. Provides various playback functions.
Definition audioplayable.h:14
void setIsLooped(bool loop)
Set loop status of the playback.
long getLength()
Get length of the clip in milliseconds.
void setPlaybackSpeed(float val)
Set playback speed.
void play()
Plays the audio clip.
void reset()
Resets current position in playback to the begining of the clip.
void prepare()
Prepares the instance for playback, needed before playaback can be done.
void setVolume(float volume)
Set volume level of the playback.
void pause()
Pauses audio playback.
An Entity is the base class for all data and behaviour oriented objects in meteor....
Definition entity.h:9