mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
PCMStream, msvc build fix, sound is an asset now
This commit is contained in:
parent
96ad7664c4
commit
33b39dfece
8 changed files with 109 additions and 30 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#endif
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "../typedefs.h"
|
||||
|
||||
#define AL_CHECK(STATEMENT) STATEMENT; AL::check_errors(__FILE__, __LINE__)
|
||||
#define AL_GET_ERORR() AL::check_errors(__FILE__, __LINE__)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,20 @@ namespace audio {
|
|||
}
|
||||
};
|
||||
|
||||
/// @brief PCM data streaming interface
|
||||
class PCMStream {
|
||||
public:
|
||||
virtual ~PCMStream() {};
|
||||
virtual size_t read(char* buffer, size_t bufferSize, bool loop)=0;
|
||||
virtual void close()=0;
|
||||
|
||||
virtual size_t getTotalSamples() const=0;
|
||||
virtual duration_t getTotalDuration() const=0;
|
||||
virtual uint getChannels() const=0;
|
||||
virtual uint getSampleRate() const=0;
|
||||
virtual uint getBitsPerSample() const=0;
|
||||
};
|
||||
|
||||
/// @brief Sound is an audio asset that supposed to support many
|
||||
/// simultaneously playing instances with different sources.
|
||||
/// So it's audio data is stored in memory.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue