Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
SoundStream.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Engine - Audio module"
3 // For conditions of distribution and use, see copyright notice in Config.hpp
4 
5 #pragma once
6 
7 #ifndef NAZARA_SOUNDSTREAM_HPP
8 #define NAZARA_SOUNDSTREAM_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Audio/Config.hpp>
12 #include <Nazara/Audio/Enums.hpp>
13 
14 namespace Nz
15 {
16  class NAZARA_AUDIO_API SoundStream
17  {
18  public:
19  SoundStream() = default;
20  virtual ~SoundStream();
21 
22  virtual UInt32 GetDuration() const = 0;
23  virtual AudioFormat GetFormat() const = 0;
24  virtual UInt64 GetSampleCount() const = 0;
25  virtual UInt32 GetSampleRate() const = 0;
26 
27  virtual UInt64 Read(void* buffer, UInt64 sampleCount) = 0;
28  virtual void Seek(UInt64 offset) = 0;
29  };
30 }
31 
32 #endif // NAZARA_SOUNDSTREAM_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
AudioFormat
WARNING: The integer value is the number of canals owned by the format.
Definition: Enums.hpp:12
Audio class that represents a sound stream.
Definition: SoundStream.hpp:16