Added Audio module
Fixed examples resources not being commited Temporary removed static build configurations
This commit is contained in:
48
include/Nazara/Audio/Sound.hpp
Normal file
48
include/Nazara/Audio/Sound.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Audio module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SOUND_HPP
|
||||
#define NAZARA_SOUND_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Audio/Enums.hpp>
|
||||
#include <Nazara/Audio/SoundBuffer.hpp>
|
||||
#include <Nazara/Audio/SoundEmitter.hpp>
|
||||
|
||||
class NAZARA_API NzSound : public NzSoundEmitter
|
||||
{
|
||||
public:
|
||||
NzSound() = default;
|
||||
NzSound(const NzSoundBuffer* soundBuffer);
|
||||
NzSound(const NzSound& sound);
|
||||
~NzSound();
|
||||
|
||||
void EnableLooping(bool loop);
|
||||
|
||||
const NzSoundBuffer* GetBuffer() const;
|
||||
nzUInt32 GetDuration() const;
|
||||
nzUInt32 GetPlayingOffset() const;
|
||||
nzSoundStatus GetStatus() const;
|
||||
|
||||
bool IsLooping() const;
|
||||
|
||||
bool LoadFromFile(const NzString& filePath, const NzSoundBufferParams& params = NzSoundBufferParams());
|
||||
bool LoadFromMemory(const void* data, std::size_t size, const NzSoundBufferParams& params = NzSoundBufferParams());
|
||||
bool LoadFromStream(NzInputStream& stream, const NzSoundBufferParams& params = NzSoundBufferParams());
|
||||
|
||||
void Pause();
|
||||
bool Play();
|
||||
|
||||
void SetBuffer(const NzSoundBuffer* buffer);
|
||||
void SetPlayingOffset(nzUInt32 offset);
|
||||
|
||||
void Stop();
|
||||
|
||||
private:
|
||||
const NzSoundBuffer* m_buffer = nullptr;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SOUND_HPP
|
||||
Reference in New Issue
Block a user