added audio stuff
This commit is contained in:
28
TSE_Core/src/elements/AudioClip.hpp
Normal file
28
TSE_Core/src/elements/AudioClip.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Types.hpp"
|
||||
#include "miniaudio.h"
|
||||
|
||||
namespace TSE
|
||||
{
|
||||
struct AudioClipDescription
|
||||
{
|
||||
public:
|
||||
string path = "";
|
||||
byte* audiostream = nullptr;
|
||||
size_t dataSize = 0;
|
||||
};
|
||||
|
||||
class AudioClip
|
||||
{
|
||||
public:
|
||||
string name = "";
|
||||
AudioClipDescription description;
|
||||
|
||||
AudioClip(string path);
|
||||
AudioClip(byte* stream, size_t size);
|
||||
|
||||
ma_sound* GetAudioSound();
|
||||
void DestroyAudioSound(ma_sound* sound);
|
||||
};
|
||||
} // namespace TSE
|
||||
Reference in New Issue
Block a user