From 09396e9694b6e0df5b37249c0d62be8d71a1ec95 Mon Sep 17 00:00:00 2001 From: Rommmmaha Date: Mon, 3 Jun 2024 14:37:25 +0300 Subject: [PATCH] . --- .gitmodules | 0 SFML/include/SFML/Audio.hpp | 56 ++ SFML/include/SFML/Audio/AlResource.hpp | 70 ++ SFML/include/SFML/Audio/Export.hpp | 48 + SFML/include/SFML/Audio/InputSoundFile.hpp | 268 ++++++ SFML/include/SFML/Audio/Listener.hpp | 234 +++++ SFML/include/SFML/Audio/Music.hpp | 337 +++++++ SFML/include/SFML/Audio/OutputSoundFile.hpp | 133 +++ SFML/include/SFML/Audio/Sound.hpp | 264 ++++++ SFML/include/SFML/Audio/SoundBuffer.hpp | 352 +++++++ .../SFML/Audio/SoundBufferRecorder.hpp | 144 +++ SFML/include/SFML/Audio/SoundFileFactory.hpp | 197 ++++ SFML/include/SFML/Audio/SoundFileFactory.inl | 100 ++ SFML/include/SFML/Audio/SoundFileReader.hpp | 165 ++++ SFML/include/SFML/Audio/SoundFileWriter.hpp | 125 +++ SFML/include/SFML/Audio/SoundRecorder.hpp | 410 ++++++++ SFML/include/SFML/Audio/SoundSource.hpp | 332 +++++++ SFML/include/SFML/Audio/SoundStream.hpp | 420 +++++++++ SFML/include/SFML/Config.hpp | 248 +++++ SFML/include/SFML/GpuPreference.hpp | 74 ++ SFML/include/SFML/Graphics.hpp | 68 ++ SFML/include/SFML/Graphics/BlendMode.hpp | 219 +++++ SFML/include/SFML/Graphics/CircleShape.hpp | 154 +++ SFML/include/SFML/Graphics/Color.hpp | 275 ++++++ SFML/include/SFML/Graphics/ConvexShape.hpp | 153 +++ SFML/include/SFML/Graphics/Drawable.hpp | 126 +++ SFML/include/SFML/Graphics/Export.hpp | 48 + SFML/include/SFML/Graphics/Font.hpp | 496 ++++++++++ SFML/include/SFML/Graphics/Glsl.hpp | 227 +++++ SFML/include/SFML/Graphics/Glsl.inl | 155 ++++ SFML/include/SFML/Graphics/Glyph.hpp | 81 ++ SFML/include/SFML/Graphics/Image.hpp | 346 +++++++ SFML/include/SFML/Graphics/PrimitiveType.hpp | 58 ++ SFML/include/SFML/Graphics/Rect.hpp | 274 ++++++ SFML/include/SFML/Graphics/Rect.inl | 171 ++++ SFML/include/SFML/Graphics/RectangleShape.hpp | 132 +++ SFML/include/SFML/Graphics/RenderStates.hpp | 174 ++++ SFML/include/SFML/Graphics/RenderTarget.hpp | 518 +++++++++++ SFML/include/SFML/Graphics/RenderTexture.hpp | 326 +++++++ SFML/include/SFML/Graphics/RenderWindow.hpp | 302 ++++++ SFML/include/SFML/Graphics/Shader.hpp | 875 ++++++++++++++++++ SFML/include/SFML/Graphics/Shape.hpp | 355 +++++++ SFML/include/SFML/Graphics/Sprite.hpp | 279 ++++++ SFML/include/SFML/Graphics/Text.hpp | 513 ++++++++++ SFML/include/SFML/Graphics/Texture.hpp | 733 +++++++++++++++ SFML/include/SFML/Graphics/Transform.hpp | 497 ++++++++++ SFML/include/SFML/Graphics/Transformable.hpp | 429 +++++++++ SFML/include/SFML/Graphics/Vertex.hpp | 148 +++ SFML/include/SFML/Graphics/VertexArray.hpp | 223 +++++ SFML/include/SFML/Graphics/VertexBuffer.hpp | 408 ++++++++ SFML/include/SFML/Graphics/View.hpp | 343 +++++++ SFML/include/SFML/Main.hpp | 43 + SFML/include/SFML/Network.hpp | 53 ++ SFML/include/SFML/Network/Export.hpp | 48 + SFML/include/SFML/Network/Ftp.hpp | 616 ++++++++++++ SFML/include/SFML/Network/Http.hpp | 482 ++++++++++ SFML/include/SFML/Network/IpAddress.hpp | 328 +++++++ SFML/include/SFML/Network/Packet.hpp | 545 +++++++++++ SFML/include/SFML/Network/Socket.hpp | 219 +++++ SFML/include/SFML/Network/SocketHandle.hpp | 57 ++ SFML/include/SFML/Network/SocketSelector.hpp | 263 ++++++ SFML/include/SFML/Network/TcpListener.hpp | 170 ++++ SFML/include/SFML/Network/TcpSocket.hpp | 316 +++++++ SFML/include/SFML/Network/UdpSocket.hpp | 292 ++++++ SFML/include/SFML/OpenGL.hpp | 78 ++ SFML/include/SFML/System.hpp | 60 ++ SFML/include/SFML/System/Clock.hpp | 117 +++ SFML/include/SFML/System/Err.hpp | 80 ++ SFML/include/SFML/System/Export.hpp | 48 + SFML/include/SFML/System/FileInputStream.hpp | 169 ++++ SFML/include/SFML/System/InputStream.hpp | 152 +++ SFML/include/SFML/System/Lock.hpp | 139 +++ .../include/SFML/System/MemoryInputStream.hpp | 148 +++ SFML/include/SFML/System/Mutex.hpp | 148 +++ SFML/include/SFML/System/NativeActivity.hpp | 62 ++ SFML/include/SFML/System/NonCopyable.hpp | 129 +++ SFML/include/SFML/System/Sleep.hpp | 52 ++ SFML/include/SFML/System/String.hpp | 669 +++++++++++++ SFML/include/SFML/System/String.inl | 53 ++ SFML/include/SFML/System/Thread.hpp | 282 ++++++ SFML/include/SFML/System/Thread.inl | 90 ++ SFML/include/SFML/System/ThreadLocal.hpp | 103 +++ SFML/include/SFML/System/ThreadLocalPtr.hpp | 158 ++++ SFML/include/SFML/System/ThreadLocalPtr.inl | 77 ++ SFML/include/SFML/System/Time.hpp | 488 ++++++++++ SFML/include/SFML/System/Utf.hpp | 763 +++++++++++++++ SFML/include/SFML/System/Utf.inl | 752 +++++++++++++++ SFML/include/SFML/System/Vector2.hpp | 301 ++++++ SFML/include/SFML/System/Vector2.inl | 161 ++++ SFML/include/SFML/System/Vector3.hpp | 302 ++++++ SFML/include/SFML/System/Vector3.inl | 168 ++++ SFML/include/SFML/Window.hpp | 58 ++ SFML/include/SFML/Window/Clipboard.hpp | 119 +++ SFML/include/SFML/Window/Context.hpp | 195 ++++ SFML/include/SFML/Window/ContextSettings.hpp | 149 +++ SFML/include/SFML/Window/Cursor.hpp | 241 +++++ SFML/include/SFML/Window/Event.hpp | 285 ++++++ SFML/include/SFML/Window/Export.hpp | 48 + SFML/include/SFML/Window/GlResource.hpp | 109 +++ SFML/include/SFML/Window/Joystick.hpp | 227 +++++ SFML/include/SFML/Window/Keyboard.hpp | 491 ++++++++++ SFML/include/SFML/Window/Mouse.hpp | 180 ++++ SFML/include/SFML/Window/Sensor.hpp | 150 +++ SFML/include/SFML/Window/Touch.hpp | 137 +++ SFML/include/SFML/Window/VideoMode.hpp | 228 +++++ SFML/include/SFML/Window/Vulkan.hpp | 115 +++ SFML/include/SFML/Window/Window.hpp | 354 +++++++ SFML/include/SFML/Window/WindowBase.hpp | 518 +++++++++++ SFML/include/SFML/Window/WindowHandle.hpp | 101 ++ SFML/include/SFML/Window/WindowStyle.hpp | 53 ++ SFML/lib/cmake/SFML/SFMLConfig.cmake | 148 +++ .../cmake/SFML/SFMLConfigDependencies.cmake | 94 ++ SFML/lib/cmake/SFML/SFMLConfigVersion.cmake | 65 ++ .../cmake/SFML/SFMLSharedTargets-debug.cmake | 69 ++ .../SFML/SFMLSharedTargets-release.cmake | 69 ++ SFML/lib/cmake/SFML/SFMLSharedTargets.cmake | 168 ++++ .../cmake/SFML/SFMLStaticTargets-debug.cmake | 69 ++ .../SFML/SFMLStaticTargets-release.cmake | 69 ++ SFML/lib/cmake/SFML/SFMLStaticTargets.cmake | 175 ++++ SFML/lib/flac.lib | Bin 0 -> 670920 bytes SFML/lib/freetype.lib | Bin 0 -> 1656740 bytes SFML/lib/ogg.lib | Bin 0 -> 42550 bytes SFML/lib/openal32.lib | Bin 0 -> 33650 bytes SFML/lib/sfml-audio-d.lib | Bin 0 -> 60806 bytes SFML/lib/sfml-audio-s-d.lib | Bin 0 -> 4637180 bytes SFML/lib/sfml-audio-s.lib | Bin 0 -> 1032652 bytes SFML/lib/sfml-audio.lib | Bin 0 -> 60444 bytes SFML/lib/sfml-graphics-d.lib | Bin 0 -> 172080 bytes SFML/lib/sfml-graphics-s-d.lib | Bin 0 -> 7679120 bytes SFML/lib/sfml-graphics-s.lib | Bin 0 -> 2144362 bytes SFML/lib/sfml-graphics.lib | Bin 0 -> 171104 bytes SFML/lib/sfml-main-d.lib | Bin 0 -> 32610 bytes SFML/lib/sfml-main.lib | Bin 0 -> 1484 bytes SFML/lib/sfml-network-d.lib | Bin 0 -> 74920 bytes SFML/lib/sfml-network-s-d.lib | Bin 0 -> 3491028 bytes SFML/lib/sfml-network-s.lib | Bin 0 -> 778560 bytes SFML/lib/sfml-network.lib | Bin 0 -> 74508 bytes SFML/lib/sfml-system-d.lib | Bin 0 -> 42908 bytes SFML/lib/sfml-system-s-d.lib | Bin 0 -> 1454824 bytes SFML/lib/sfml-system-s.lib | Bin 0 -> 265796 bytes SFML/lib/sfml-system.lib | Bin 0 -> 42624 bytes SFML/lib/sfml-window-d.lib | Bin 0 -> 46644 bytes SFML/lib/sfml-window-s-d.lib | Bin 0 -> 4771872 bytes SFML/lib/sfml-window-s.lib | Bin 0 -> 898082 bytes SFML/lib/sfml-window.lib | Bin 0 -> 46358 bytes SFML/lib/vorbis.lib | Bin 0 -> 996018 bytes SFML/lib/vorbisenc.lib | Bin 0 -> 693286 bytes SFML/lib/vorbisfile.lib | Bin 0 -> 66564 bytes SFML/license.md | 21 + SFML/readme.md | 39 + 150 files changed, 27008 insertions(+) create mode 100644 .gitmodules create mode 100644 SFML/include/SFML/Audio.hpp create mode 100644 SFML/include/SFML/Audio/AlResource.hpp create mode 100644 SFML/include/SFML/Audio/Export.hpp create mode 100644 SFML/include/SFML/Audio/InputSoundFile.hpp create mode 100644 SFML/include/SFML/Audio/Listener.hpp create mode 100644 SFML/include/SFML/Audio/Music.hpp create mode 100644 SFML/include/SFML/Audio/OutputSoundFile.hpp create mode 100644 SFML/include/SFML/Audio/Sound.hpp create mode 100644 SFML/include/SFML/Audio/SoundBuffer.hpp create mode 100644 SFML/include/SFML/Audio/SoundBufferRecorder.hpp create mode 100644 SFML/include/SFML/Audio/SoundFileFactory.hpp create mode 100644 SFML/include/SFML/Audio/SoundFileFactory.inl create mode 100644 SFML/include/SFML/Audio/SoundFileReader.hpp create mode 100644 SFML/include/SFML/Audio/SoundFileWriter.hpp create mode 100644 SFML/include/SFML/Audio/SoundRecorder.hpp create mode 100644 SFML/include/SFML/Audio/SoundSource.hpp create mode 100644 SFML/include/SFML/Audio/SoundStream.hpp create mode 100644 SFML/include/SFML/Config.hpp create mode 100644 SFML/include/SFML/GpuPreference.hpp create mode 100644 SFML/include/SFML/Graphics.hpp create mode 100644 SFML/include/SFML/Graphics/BlendMode.hpp create mode 100644 SFML/include/SFML/Graphics/CircleShape.hpp create mode 100644 SFML/include/SFML/Graphics/Color.hpp create mode 100644 SFML/include/SFML/Graphics/ConvexShape.hpp create mode 100644 SFML/include/SFML/Graphics/Drawable.hpp create mode 100644 SFML/include/SFML/Graphics/Export.hpp create mode 100644 SFML/include/SFML/Graphics/Font.hpp create mode 100644 SFML/include/SFML/Graphics/Glsl.hpp create mode 100644 SFML/include/SFML/Graphics/Glsl.inl create mode 100644 SFML/include/SFML/Graphics/Glyph.hpp create mode 100644 SFML/include/SFML/Graphics/Image.hpp create mode 100644 SFML/include/SFML/Graphics/PrimitiveType.hpp create mode 100644 SFML/include/SFML/Graphics/Rect.hpp create mode 100644 SFML/include/SFML/Graphics/Rect.inl create mode 100644 SFML/include/SFML/Graphics/RectangleShape.hpp create mode 100644 SFML/include/SFML/Graphics/RenderStates.hpp create mode 100644 SFML/include/SFML/Graphics/RenderTarget.hpp create mode 100644 SFML/include/SFML/Graphics/RenderTexture.hpp create mode 100644 SFML/include/SFML/Graphics/RenderWindow.hpp create mode 100644 SFML/include/SFML/Graphics/Shader.hpp create mode 100644 SFML/include/SFML/Graphics/Shape.hpp create mode 100644 SFML/include/SFML/Graphics/Sprite.hpp create mode 100644 SFML/include/SFML/Graphics/Text.hpp create mode 100644 SFML/include/SFML/Graphics/Texture.hpp create mode 100644 SFML/include/SFML/Graphics/Transform.hpp create mode 100644 SFML/include/SFML/Graphics/Transformable.hpp create mode 100644 SFML/include/SFML/Graphics/Vertex.hpp create mode 100644 SFML/include/SFML/Graphics/VertexArray.hpp create mode 100644 SFML/include/SFML/Graphics/VertexBuffer.hpp create mode 100644 SFML/include/SFML/Graphics/View.hpp create mode 100644 SFML/include/SFML/Main.hpp create mode 100644 SFML/include/SFML/Network.hpp create mode 100644 SFML/include/SFML/Network/Export.hpp create mode 100644 SFML/include/SFML/Network/Ftp.hpp create mode 100644 SFML/include/SFML/Network/Http.hpp create mode 100644 SFML/include/SFML/Network/IpAddress.hpp create mode 100644 SFML/include/SFML/Network/Packet.hpp create mode 100644 SFML/include/SFML/Network/Socket.hpp create mode 100644 SFML/include/SFML/Network/SocketHandle.hpp create mode 100644 SFML/include/SFML/Network/SocketSelector.hpp create mode 100644 SFML/include/SFML/Network/TcpListener.hpp create mode 100644 SFML/include/SFML/Network/TcpSocket.hpp create mode 100644 SFML/include/SFML/Network/UdpSocket.hpp create mode 100644 SFML/include/SFML/OpenGL.hpp create mode 100644 SFML/include/SFML/System.hpp create mode 100644 SFML/include/SFML/System/Clock.hpp create mode 100644 SFML/include/SFML/System/Err.hpp create mode 100644 SFML/include/SFML/System/Export.hpp create mode 100644 SFML/include/SFML/System/FileInputStream.hpp create mode 100644 SFML/include/SFML/System/InputStream.hpp create mode 100644 SFML/include/SFML/System/Lock.hpp create mode 100644 SFML/include/SFML/System/MemoryInputStream.hpp create mode 100644 SFML/include/SFML/System/Mutex.hpp create mode 100644 SFML/include/SFML/System/NativeActivity.hpp create mode 100644 SFML/include/SFML/System/NonCopyable.hpp create mode 100644 SFML/include/SFML/System/Sleep.hpp create mode 100644 SFML/include/SFML/System/String.hpp create mode 100644 SFML/include/SFML/System/String.inl create mode 100644 SFML/include/SFML/System/Thread.hpp create mode 100644 SFML/include/SFML/System/Thread.inl create mode 100644 SFML/include/SFML/System/ThreadLocal.hpp create mode 100644 SFML/include/SFML/System/ThreadLocalPtr.hpp create mode 100644 SFML/include/SFML/System/ThreadLocalPtr.inl create mode 100644 SFML/include/SFML/System/Time.hpp create mode 100644 SFML/include/SFML/System/Utf.hpp create mode 100644 SFML/include/SFML/System/Utf.inl create mode 100644 SFML/include/SFML/System/Vector2.hpp create mode 100644 SFML/include/SFML/System/Vector2.inl create mode 100644 SFML/include/SFML/System/Vector3.hpp create mode 100644 SFML/include/SFML/System/Vector3.inl create mode 100644 SFML/include/SFML/Window.hpp create mode 100644 SFML/include/SFML/Window/Clipboard.hpp create mode 100644 SFML/include/SFML/Window/Context.hpp create mode 100644 SFML/include/SFML/Window/ContextSettings.hpp create mode 100644 SFML/include/SFML/Window/Cursor.hpp create mode 100644 SFML/include/SFML/Window/Event.hpp create mode 100644 SFML/include/SFML/Window/Export.hpp create mode 100644 SFML/include/SFML/Window/GlResource.hpp create mode 100644 SFML/include/SFML/Window/Joystick.hpp create mode 100644 SFML/include/SFML/Window/Keyboard.hpp create mode 100644 SFML/include/SFML/Window/Mouse.hpp create mode 100644 SFML/include/SFML/Window/Sensor.hpp create mode 100644 SFML/include/SFML/Window/Touch.hpp create mode 100644 SFML/include/SFML/Window/VideoMode.hpp create mode 100644 SFML/include/SFML/Window/Vulkan.hpp create mode 100644 SFML/include/SFML/Window/Window.hpp create mode 100644 SFML/include/SFML/Window/WindowBase.hpp create mode 100644 SFML/include/SFML/Window/WindowHandle.hpp create mode 100644 SFML/include/SFML/Window/WindowStyle.hpp create mode 100644 SFML/lib/cmake/SFML/SFMLConfig.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLConfigDependencies.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLConfigVersion.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLSharedTargets-debug.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLSharedTargets-release.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLSharedTargets.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLStaticTargets-debug.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLStaticTargets-release.cmake create mode 100644 SFML/lib/cmake/SFML/SFMLStaticTargets.cmake create mode 100644 SFML/lib/flac.lib create mode 100644 SFML/lib/freetype.lib create mode 100644 SFML/lib/ogg.lib create mode 100644 SFML/lib/openal32.lib create mode 100644 SFML/lib/sfml-audio-d.lib create mode 100644 SFML/lib/sfml-audio-s-d.lib create mode 100644 SFML/lib/sfml-audio-s.lib create mode 100644 SFML/lib/sfml-audio.lib create mode 100644 SFML/lib/sfml-graphics-d.lib create mode 100644 SFML/lib/sfml-graphics-s-d.lib create mode 100644 SFML/lib/sfml-graphics-s.lib create mode 100644 SFML/lib/sfml-graphics.lib create mode 100644 SFML/lib/sfml-main-d.lib create mode 100644 SFML/lib/sfml-main.lib create mode 100644 SFML/lib/sfml-network-d.lib create mode 100644 SFML/lib/sfml-network-s-d.lib create mode 100644 SFML/lib/sfml-network-s.lib create mode 100644 SFML/lib/sfml-network.lib create mode 100644 SFML/lib/sfml-system-d.lib create mode 100644 SFML/lib/sfml-system-s-d.lib create mode 100644 SFML/lib/sfml-system-s.lib create mode 100644 SFML/lib/sfml-system.lib create mode 100644 SFML/lib/sfml-window-d.lib create mode 100644 SFML/lib/sfml-window-s-d.lib create mode 100644 SFML/lib/sfml-window-s.lib create mode 100644 SFML/lib/sfml-window.lib create mode 100644 SFML/lib/vorbis.lib create mode 100644 SFML/lib/vorbisenc.lib create mode 100644 SFML/lib/vorbisfile.lib create mode 100644 SFML/license.md create mode 100644 SFML/readme.md diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/SFML/include/SFML/Audio.hpp b/SFML/include/SFML/Audio.hpp new file mode 100644 index 0000000..d5f798d --- /dev/null +++ b/SFML/include/SFML/Audio.hpp @@ -0,0 +1,56 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_AUDIO_HPP +#define SFML_AUDIO_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif // SFML_AUDIO_HPP + +//////////////////////////////////////////////////////////// +/// \defgroup audio Audio module +/// +/// Sounds, streaming (musics or custom sources), recording, +/// spatialization. +/// +//////////////////////////////////////////////////////////// diff --git a/SFML/include/SFML/Audio/AlResource.hpp b/SFML/include/SFML/Audio/AlResource.hpp new file mode 100644 index 0000000..7ac21fe --- /dev/null +++ b/SFML/include/SFML/Audio/AlResource.hpp @@ -0,0 +1,70 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_ALRESOURCE_HPP +#define SFML_ALRESOURCE_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +//////////////////////////////////////////////////////////// +/// \brief Base class for classes that require an OpenAL context +/// +//////////////////////////////////////////////////////////// +class SFML_AUDIO_API AlResource +{ +protected: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + //////////////////////////////////////////////////////////// + AlResource(); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + ~AlResource(); +}; + +} // namespace sf + + +#endif // SFML_ALRESOURCE_HPP + +//////////////////////////////////////////////////////////// +/// \class sf::AlResource +/// \ingroup audio +/// +/// This class is for internal use only, it must be the base +/// of every class that requires a valid OpenAL context in +/// order to work. +/// +//////////////////////////////////////////////////////////// diff --git a/SFML/include/SFML/Audio/Export.hpp b/SFML/include/SFML/Audio/Export.hpp new file mode 100644 index 0000000..e253151 --- /dev/null +++ b/SFML/include/SFML/Audio/Export.hpp @@ -0,0 +1,48 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_AUDIO_EXPORT_HPP +#define SFML_AUDIO_EXPORT_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +//////////////////////////////////////////////////////////// +// Define portable import / export macros +//////////////////////////////////////////////////////////// +#if defined(SFML_AUDIO_EXPORTS) + + #define SFML_AUDIO_API SFML_API_EXPORT + +#else + + #define SFML_AUDIO_API SFML_API_IMPORT + +#endif + + +#endif // SFML_AUDIO_EXPORT_HPP diff --git a/SFML/include/SFML/Audio/InputSoundFile.hpp b/SFML/include/SFML/Audio/InputSoundFile.hpp new file mode 100644 index 0000000..0a02b14 --- /dev/null +++ b/SFML/include/SFML/Audio/InputSoundFile.hpp @@ -0,0 +1,268 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_INPUTSOUNDFILE_HPP +#define SFML_INPUTSOUNDFILE_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + + +namespace sf +{ +class InputStream; +class SoundFileReader; + +//////////////////////////////////////////////////////////// +/// \brief Provide read access to sound files +/// +//////////////////////////////////////////////////////////// +class SFML_AUDIO_API InputSoundFile : NonCopyable +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + //////////////////////////////////////////////////////////// + InputSoundFile(); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + ~InputSoundFile(); + + //////////////////////////////////////////////////////////// + /// \brief Open a sound file from the disk for reading + /// + /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC, MP3. + /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. + /// + /// Because of minimp3_ex limitation, for MP3 files with big (>16kb) APEv2 tag, + /// it may not be properly removed, tag data will be treated as MP3 data + /// and there is a low chance of garbage decoded at the end of file. + /// See also: https://github.com/lieff/minimp3 + /// + /// \param filename Path of the sound file to load + /// + /// \return True if the file was successfully opened + /// + //////////////////////////////////////////////////////////// + bool openFromFile(const std::string& filename); + + //////////////////////////////////////////////////////////// + /// \brief Open a sound file in memory for reading + /// + /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. + /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. + /// + /// \param data Pointer to the file data in memory + /// \param sizeInBytes Size of the data to load, in bytes + /// + /// \return True if the file was successfully opened + /// + //////////////////////////////////////////////////////////// + bool openFromMemory(const void* data, std::size_t sizeInBytes); + + //////////////////////////////////////////////////////////// + /// \brief Open a sound file from a custom stream for reading + /// + /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. + /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. + /// + /// \param stream Source stream to read from + /// + /// \return True if the file was successfully opened + /// + //////////////////////////////////////////////////////////// + bool openFromStream(InputStream& stream); + + //////////////////////////////////////////////////////////// + /// \brief Get the total number of audio samples in the file + /// + /// \return Number of samples + /// + //////////////////////////////////////////////////////////// + Uint64 getSampleCount() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the number of channels used by the sound + /// + /// \return Number of channels (1 = mono, 2 = stereo) + /// + //////////////////////////////////////////////////////////// + unsigned int getChannelCount() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the sample rate of the sound + /// + /// \return Sample rate, in samples per second + /// + //////////////////////////////////////////////////////////// + unsigned int getSampleRate() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the total duration of the sound file + /// + /// This function is provided for convenience, the duration is + /// deduced from the other sound file attributes. + /// + /// \return Duration of the sound file + /// + //////////////////////////////////////////////////////////// + Time getDuration() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the read offset of the file in time + /// + /// \return Time position + /// + //////////////////////////////////////////////////////////// + Time getTimeOffset() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the read offset of the file in samples + /// + /// \return Sample position + /// + //////////////////////////////////////////////////////////// + Uint64 getSampleOffset() const; + + //////////////////////////////////////////////////////////// + /// \brief Change the current read position to the given sample offset + /// + /// This function takes a sample offset to provide maximum + /// precision. If you need to jump to a given time, use the + /// other overload. + /// + /// The sample offset takes the channels into account. + /// If you have a time offset instead, you can easily find + /// the corresponding sample offset with the following formula: + /// `timeInSeconds * sampleRate * channelCount` + /// If the given offset exceeds to total number of samples, + /// this function jumps to the end of the sound file. + /// + /// \param sampleOffset Index of the sample to jump to, relative to the beginning + /// + //////////////////////////////////////////////////////////// + void seek(Uint64 sampleOffset); + + //////////////////////////////////////////////////////////// + /// \brief Change the current read position to the given time offset + /// + /// Using a time offset is handy but imprecise. If you need an accurate + /// result, consider using the overload which takes a sample offset. + /// + /// If the given time exceeds to total duration, this function jumps + /// to the end of the sound file. + /// + /// \param timeOffset Time to jump to, relative to the beginning + /// + //////////////////////////////////////////////////////////// + void seek(Time timeOffset); + + //////////////////////////////////////////////////////////// + /// \brief Read audio samples from the open file + /// + /// \param samples Pointer to the sample array to fill + /// \param maxCount Maximum number of samples to read + /// + /// \return Number of samples actually read (may be less than \a maxCount) + /// + //////////////////////////////////////////////////////////// + Uint64 read(Int16* samples, Uint64 maxCount); + + //////////////////////////////////////////////////////////// + /// \brief Close the current file + /// + //////////////////////////////////////////////////////////// + void close(); + +private: + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + SoundFileReader* m_reader; //!< Reader that handles I/O on the file's format + InputStream* m_stream; //!< Input stream used to access the file's data + bool m_streamOwned; //!< Is the stream internal or external? + Uint64 m_sampleOffset; //!< Sample Read Position + Uint64 m_sampleCount; //!< Total number of samples in the file + unsigned int m_channelCount; //!< Number of channels of the sound + unsigned int m_sampleRate; //!< Number of samples per second +}; + +} // namespace sf + + +#endif // SFML_INPUTSOUNDFILE_HPP + + +//////////////////////////////////////////////////////////// +/// \class sf::InputSoundFile +/// \ingroup audio +/// +/// This class decodes audio samples from a sound file. It is +/// used internally by higher-level classes such as sf::SoundBuffer +/// and sf::Music, but can also be useful if you want to process +/// or analyze audio files without playing them, or if you want to +/// implement your own version of sf::Music with more specific +/// features. +/// +/// Usage example: +/// \code +/// // Open a sound file +/// sf::InputSoundFile file; +/// if (!file.openFromFile("music.ogg")) +/// /* error */; +/// +/// // Print the sound attributes +/// std::cout << "duration: " << file.getDuration().asSeconds() << std::endl; +/// std::cout << "channels: " << file.getChannelCount() << std::endl; +/// std::cout << "sample rate: " << file.getSampleRate() << std::endl; +/// std::cout << "sample count: " << file.getSampleCount() << std::endl; +/// +/// // Read and process batches of samples until the end of file is reached +/// sf::Int16 samples[1024]; +/// sf::Uint64 count; +/// do +/// { +/// count = file.read(samples, 1024); +/// +/// // process, analyze, play, convert, or whatever +/// // you want to do with the samples... +/// } +/// while (count > 0); +/// \endcode +/// +/// \see sf::SoundFileReader, sf::OutputSoundFile +/// +//////////////////////////////////////////////////////////// diff --git a/SFML/include/SFML/Audio/Listener.hpp b/SFML/include/SFML/Audio/Listener.hpp new file mode 100644 index 0000000..edfe650 --- /dev/null +++ b/SFML/include/SFML/Audio/Listener.hpp @@ -0,0 +1,234 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_LISTENER_HPP +#define SFML_LISTENER_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +namespace sf +{ +//////////////////////////////////////////////////////////// +/// \brief The audio listener is the point in the scene +/// from where all the sounds are heard +/// +//////////////////////////////////////////////////////////// +class SFML_AUDIO_API Listener +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Change the global volume of all the sounds and musics + /// + /// The volume is a number between 0 and 100; it is combined with + /// the individual volume of each sound / music. + /// The default value for the volume is 100 (maximum). + /// + /// \param volume New global volume, in the range [0, 100] + /// + /// \see getGlobalVolume + /// + //////////////////////////////////////////////////////////// + static void setGlobalVolume(float volume); + + //////////////////////////////////////////////////////////// + /// \brief Get the current value of the global volume + /// + /// \return Current global volume, in the range [0, 100] + /// + /// \see setGlobalVolume + /// + //////////////////////////////////////////////////////////// + static float getGlobalVolume(); + + //////////////////////////////////////////////////////////// + /// \brief Set the position of the listener in the scene + /// + /// The default listener's position is (0, 0, 0). + /// + /// \param x X coordinate of the listener's position + /// \param y Y coordinate of the listener's position + /// \param z Z coordinate of the listener's position + /// + /// \see getPosition, setDirection + /// + //////////////////////////////////////////////////////////// + static void setPosition(float x, float y, float z); + + //////////////////////////////////////////////////////////// + /// \brief Set the position of the listener in the scene + /// + /// The default listener's position is (0, 0, 0). + /// + /// \param position New listener's position + /// + /// \see getPosition, setDirection + /// + //////////////////////////////////////////////////////////// + static void setPosition(const Vector3f& position); + + //////////////////////////////////////////////////////////// + /// \brief Get the current position of the listener in the scene + /// + /// \return Listener's position + /// + /// \see setPosition + /// + //////////////////////////////////////////////////////////// + static Vector3f getPosition(); + + //////////////////////////////////////////////////////////// + /// \brief Set the forward vector of the listener in the scene + /// + /// The direction (also called "at vector") is the vector + /// pointing forward from the listener's perspective. Together + /// with the up vector, it defines the 3D orientation of the + /// listener in the scene. The direction vector doesn't + /// have to be normalized. + /// The default listener's direction is (0, 0, -1). + /// + /// \param x X coordinate of the listener's direction + /// \param y Y coordinate of the listener's direction + /// \param z Z coordinate of the listener's direction + /// + /// \see getDirection, setUpVector, setPosition + /// + //////////////////////////////////////////////////////////// + static void setDirection(float x, float y, float z); + + //////////////////////////////////////////////////////////// + /// \brief Set the forward vector of the listener in the scene + /// + /// The direction (also called "at vector") is the vector + /// pointing forward from the listener's perspective. Together + /// with the up vector, it defines the 3D orientation of the + /// listener in the scene. The direction vector doesn't + /// have to be normalized. + /// The default listener's direction is (0, 0, -1). + /// + /// \param direction New listener's direction + /// + /// \see getDirection, setUpVector, setPosition + /// + //////////////////////////////////////////////////////////// + static void setDirection(const Vector3f& direction); + + //////////////////////////////////////////////////////////// + /// \brief Get the current forward vector of the listener in the scene + /// + /// \return Listener's forward vector (not normalized) + /// + /// \see setDirection + /// + //////////////////////////////////////////////////////////// + static Vector3f getDirection(); + + //////////////////////////////////////////////////////////// + /// \brief Set the upward vector of the listener in the scene + /// + /// The up vector is the vector that points upward from the + /// listener's perspective. Together with the direction, it + /// defines the 3D orientation of the listener in the scene. + /// The up vector doesn't have to be normalized. + /// The default listener's up vector is (0, 1, 0). It is usually + /// not necessary to change it, especially in 2D scenarios. + /// + /// \param x X coordinate of the listener's up vector + /// \param y Y coordinate of the listener's up vector + /// \param z Z coordinate of the listener's up vector + /// + /// \see getUpVector, setDirection, setPosition + /// + //////////////////////////////////////////////////////////// + static void setUpVector(float x, float y, float z); + + //////////////////////////////////////////////////////////// + /// \brief Set the upward vector of the listener in the scene + /// + /// The up vector is the vector that points upward from the + /// listener's perspective. Together with the direction, it + /// defines the 3D orientation of the listener in the scene. + /// The up vector doesn't have to be normalized. + /// The default listener's up vector is (0, 1, 0). It is usually + /// not necessary to change it, especially in 2D scenarios. + /// + /// \param upVector New listener's up vector + /// + /// \see getUpVector, setDirection, setPosition + /// + //////////////////////////////////////////////////////////// + static void setUpVector(const Vector3f& upVector); + + //////////////////////////////////////////////////////////// + /// \brief Get the current upward vector of the listener in the scene + /// + /// \return Listener's upward vector (not normalized) + /// + /// \see setUpVector + /// + //////////////////////////////////////////////////////////// + static Vector3f getUpVector(); +}; + +} // namespace sf + + +#endif // SFML_LISTENER_HPP + + +//////////////////////////////////////////////////////////// +/// \class sf::Listener +/// \ingroup audio +/// +/// The audio listener defines the global properties of the +/// audio environment, it defines where and how sounds and musics +/// are heard. If sf::View is the eyes of the user, then sf::Listener +/// is his ears (by the way, they are often linked together -- +/// same position, orientation, etc.). +/// +/// sf::Listener is a simple interface, which allows to setup the +/// listener in the 3D audio environment (position, direction and +/// up vector), and to adjust the global volume. +/// +/// Because the listener is unique in the scene, sf::Listener only +/// contains static functions and doesn't have to be instantiated. +/// +/// Usage example: +/// \code +/// // Move the listener to the position (1, 0, -5) +/// sf::Listener::setPosition(1, 0, -5); +/// +/// // Make it face the right axis (1, 0, 0) +/// sf::Listener::setDirection(1, 0, 0); +/// +/// // Reduce the global volume +/// sf::Listener::setGlobalVolume(50); +/// \endcode +/// +//////////////////////////////////////////////////////////// diff --git a/SFML/include/SFML/Audio/Music.hpp b/SFML/include/SFML/Audio/Music.hpp new file mode 100644 index 0000000..4c4eefb --- /dev/null +++ b/SFML/include/SFML/Audio/Music.hpp @@ -0,0 +1,337 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_MUSIC_HPP +#define SFML_MUSIC_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include + + +namespace sf +{ +class InputStream; + +//////////////////////////////////////////////////////////// +/// \brief Streamed music played from an audio file +/// +//////////////////////////////////////////////////////////// +class SFML_AUDIO_API Music : public SoundStream +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Structure defining a time range using the template type + /// + //////////////////////////////////////////////////////////// + template + struct Span + { + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + //////////////////////////////////////////////////////////// + Span() + { + + } + + //////////////////////////////////////////////////////////// + /// \brief Initialization constructor + /// + /// \param off Initial Offset + /// \param len Initial Length + /// + //////////////////////////////////////////////////////////// + Span(T off, T len): + offset(off), + length(len) + { + + } + + T offset; //!< The beginning offset of the time range + T length; //!< The length of the time range + }; + + // Define the relevant Span types + typedef Span