aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/AudioSource.cpp
blob: 4baac9a0ab118d5b52b55f2d2db4b8dae51a5059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "AudioSource.h"

using namespace crepe;
using namespace std;

AudioSource::AudioSource(game_object_id_t id, const Asset & src) :
	Component(id),
	source(src)
{ }

void AudioSource::play(bool looping) {
	this->loop = looping;
	this->playing = true;
}

void AudioSource::stop() {
	this->playing = false;
	this->rewind = true;
}