Fix issue in Rocket.lua script.
[Cafu-Engine.git] / Libs / SoundSystem / SoundSysFMOD3 / StreamingBuffer.hpp
blob98e33993bf287924c7bd620723b71a2468dccbf9
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
7 #ifndef CAFU_SOUNDSYS_STREAMING_BUFFER_HPP_INCLUDED
8 #define CAFU_SOUNDSYS_STREAMING_BUFFER_HPP_INCLUDED
10 #include "Buffer.hpp"
13 struct FSOUND_STREAM;
16 /// A streaming buffer created from an audio file.
17 /// Streaming buffers stream the audio data from a file instead of loading
18 /// it completely into memory.
19 /// This class is basically just a wrapper around the FMOD3 sound stream object.
20 class StreamingBufferT : public BufferT
22 public:
24 /// Constructor.
25 /// Creates a streaming buffer from an audio file.
26 /// @param AudioFile Path to the audio file from which the buffer should be created.
27 /// @param Is3DSound Whether the buffer is used as a 3D sound object.
28 StreamingBufferT(const std::string& AudioFile, bool Is3DSound);
30 /// Destructor.
31 ~StreamingBufferT();
33 // BufferT implementation.
34 int AttachToChannel(unsigned int Priority);
35 void Rewind();
38 private:
40 FSOUND_STREAM* m_Stream; ///< The FMOD3 sound stream used with this static buffer.
42 // Don't allow use of copy and assignment constructor.
43 StreamingBufferT(StreamingBufferT&);
44 StreamingBufferT& operator=(const StreamingBufferT&);
47 #endif