Added Audio module

Fixed examples resources not being commited
Temporary removed static build configurations
This commit is contained in:
Lynix
2012-08-21 15:04:00 +02:00
parent 71b777e732
commit 40ec2003b4
28 changed files with 1541 additions and 13 deletions

View 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