aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/AudioSource.cpp
blob: cc708017db27979c0b271add1978be09d05eaf92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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->oneshot_play = true;
}

void AudioSource::stop() {
	this->oneshot_stop = true;
}