7 #ifndef NAZARA_MUSIC_HPP 8 #define NAZARA_MUSIC_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Audio/Enums.hpp> 12 #include <Nazara/Audio/SoundEmitter.hpp> 13 #include <Nazara/Core/MovablePtr.hpp> 14 #include <Nazara/Core/Resource.hpp> 15 #include <Nazara/Core/ResourceLoader.hpp> 16 #include <Nazara/Core/ResourceParameters.hpp> 20 struct MusicParams : ResourceParameters
22 bool forceMono =
false;
30 using MusicLoader = ResourceLoader<Music, MusicParams>;
47 void EnableLooping(
bool loop)
override;
49 UInt32 GetDuration()
const override;
51 UInt32 GetPlayingOffset()
const override;
52 UInt64 GetSampleCount()
const;
53 UInt32 GetSampleRate()
const;
54 SoundStatus GetStatus()
const override;
56 bool IsLooping()
const override;
58 bool OpenFromFile(
const String& filePath,
const MusicParams& params = MusicParams());
59 bool OpenFromMemory(
const void* data, std::size_t size,
const MusicParams& params = MusicParams());
60 bool OpenFromStream(
Stream& stream,
const MusicParams& params = MusicParams());
62 void Pause()
override;
65 void SetPlayingOffset(UInt32 offset);
75 bool FillAndQueueBuffer(
unsigned int buffer);
79 static MusicLoader::LoaderList s_loaders;
83 #endif // NAZARA_MUSIC_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
Core class that represents a string.
Definition: String.hpp:22
Audio class that represents a sound stream.
Definition: SoundStream.hpp:16
Core class that represents a loader of resources.
Definition: ResourceLoader.hpp:23
Core class that represents a resource.
Definition: Resource.hpp:15
Audio class that represents a music.
Definition: Music.hpp:34
Audio class that represents a sound source, that emits sound.
Definition: SoundEmitter.hpp:19
Core class that represents a stream.
Definition: Stream.hpp:19