Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Source.hpp
1
#pragma once
2
3
#include "AudioClip.hpp"
4
#include "al.h"
5
#include "alc.h"
6
7
namespace
Grindstone {
8
namespace
Audio {
9
class
Source
{
10
public
:
11
struct
CreateInfo
{
12
float
volume = 1.f;
13
float
pitch = 1.f;
14
float
position[3];
15
float
velocity[3];
16
Audio::AudioClipAsset
* audioClip =
nullptr
;
17
bool
isLooping =
false
;
18
};
19
public
:
20
Source
();
21
Source
(
CreateInfo
& createInfo);
22
~Source
();
23
void
Play();
24
void
Pause();
25
void
SetVolume(
float
volume);
26
void
SetPitch(
float
pitch);
27
void
SetPosition(
float
x,
float
y,
float
z);
28
void
SetVelocity(
float
x,
float
y,
float
z);
29
void
SetBuffer(
Audio::AudioClipAsset
* audioClip);
30
void
SetIsLooping(
bool
isLooping);
31
bool
IsPlaying();
32
private
:
33
ALuint source;
34
};
35
}
36
}
Grindstone::Audio::Source
Definition
Source.hpp:9
Grindstone::Audio::AudioClipAsset
Definition
AudioClip.hpp:9
Grindstone::Audio::Source::CreateInfo
Definition
Source.hpp:11
sources
code
Plugins
AudioOpenAL
Source.hpp
Generated by
1.12.0