Skip to content

Commit e5aab56

Browse files
committed
feat: full ghost voip integration
- updated sfml to 3.0.2 (built static libs myself) - had to update some code bc of that
1 parent 829c5eb commit e5aab56

File tree

133 files changed

+21947
-2811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+21947
-2811
lines changed

lib/SFML/include/SFML/Audio.hpp

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
////////////////////////////////////////////////////////////
2+
//
3+
// SFML - Simple and Fast Multimedia Library
4+
// Copyright (C) 2007-2025 Laurent Gomila ([email protected])
5+
//
6+
// This software is provided 'as-is', without any express or implied warranty.
7+
// In no event will the authors be held liable for any damages arising from the use of this software.
8+
//
9+
// Permission is granted to anyone to use this software for any purpose,
10+
// including commercial applications, and to alter it and redistribute it freely,
11+
// subject to the following restrictions:
12+
//
13+
// 1. The origin of this software must not be misrepresented;
14+
// you must not claim that you wrote the original software.
15+
// If you use this software in a product, an acknowledgment
16+
// in the product documentation would be appreciated but is not required.
17+
//
18+
// 2. Altered source versions must be plainly marked as such,
19+
// and must not be misrepresented as being the original software.
20+
//
21+
// 3. This notice may not be removed or altered from any source distribution.
22+
//
23+
////////////////////////////////////////////////////////////
24+
25+
#pragma once
26+
27+
////////////////////////////////////////////////////////////
28+
// Headers
29+
////////////////////////////////////////////////////////////
30+
31+
#include <SFML/Audio/InputSoundFile.hpp>
32+
#include <SFML/Audio/Listener.hpp>
33+
#include <SFML/Audio/Music.hpp>
34+
#include <SFML/Audio/OutputSoundFile.hpp>
35+
#include <SFML/Audio/PlaybackDevice.hpp>
36+
#include <SFML/Audio/Sound.hpp>
37+
#include <SFML/Audio/SoundBuffer.hpp>
38+
#include <SFML/Audio/SoundBufferRecorder.hpp>
39+
#include <SFML/Audio/SoundFileFactory.hpp>
40+
#include <SFML/Audio/SoundFileReader.hpp>
41+
#include <SFML/Audio/SoundFileWriter.hpp>
42+
#include <SFML/Audio/SoundRecorder.hpp>
43+
#include <SFML/Audio/SoundSource.hpp>
44+
#include <SFML/Audio/SoundStream.hpp>
45+
46+
#include <SFML/System.hpp>
47+
48+
49+
////////////////////////////////////////////////////////////
50+
/// \defgroup audio Audio module
51+
///
52+
/// Sounds, streaming (musics or custom sources), recording,
53+
/// spatialization.
54+
///
55+
////////////////////////////////////////////////////////////
Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
////////////////////////////////////////////////////////////
22
//
33
// SFML - Simple and Fast Multimedia Library
4-
// Copyright (C) 2007-2018 Laurent Gomila ([email protected])
4+
// Copyright (C) 2007-2025 Laurent Gomila ([email protected])
55
//
66
// This software is provided 'as-is', without any express or implied warranty.
77
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -22,82 +22,72 @@
2222
//
2323
////////////////////////////////////////////////////////////
2424

25-
#ifndef SFML_THREADLOCAL_HPP
26-
#define SFML_THREADLOCAL_HPP
25+
#pragma once
2726

2827
////////////////////////////////////////////////////////////
2928
// Headers
3029
////////////////////////////////////////////////////////////
31-
#include <SFML/System/Export.hpp>
32-
#include <SFML/System/NonCopyable.hpp>
33-
#include <cstdlib>
30+
#include <SFML/Audio/Export.hpp>
31+
32+
#include <memory>
3433

3534

3635
namespace sf
3736
{
38-
namespace priv
39-
{
40-
class ThreadLocalImpl;
41-
}
42-
4337
////////////////////////////////////////////////////////////
44-
/// \brief Defines variables with thread-local storage
38+
/// \brief Base class for classes that require an audio device
4539
///
4640
////////////////////////////////////////////////////////////
47-
class SFML_SYSTEM_API ThreadLocal : NonCopyable
41+
class SFML_AUDIO_API AudioResource
4842
{
4943
public:
50-
5144
////////////////////////////////////////////////////////////
52-
/// \brief Default constructor
53-
///
54-
/// \param value Optional value to initialize the variable
45+
/// \brief Copy constructor
5546
///
5647
////////////////////////////////////////////////////////////
57-
ThreadLocal(void* value = NULL);
48+
AudioResource(const AudioResource&) = default;
5849

5950
////////////////////////////////////////////////////////////
60-
/// \brief Destructor
51+
/// \brief Copy assignment
6152
///
6253
////////////////////////////////////////////////////////////
63-
~ThreadLocal();
54+
AudioResource& operator=(const AudioResource&) = default;
6455

6556
////////////////////////////////////////////////////////////
66-
/// \brief Set the thread-specific value of the variable
67-
///
68-
/// \param value Value of the variable for the current thread
57+
/// \brief Move constructor
6958
///
7059
////////////////////////////////////////////////////////////
71-
void setValue(void* value);
60+
AudioResource(AudioResource&&) noexcept = default;
7261

7362
////////////////////////////////////////////////////////////
74-
/// \brief Retrieve the thread-specific value of the variable
63+
/// \brief Move assignment
7564
///
76-
/// \return Value of the variable for the current thread
65+
////////////////////////////////////////////////////////////
66+
AudioResource& operator=(AudioResource&&) noexcept = default;
67+
68+
protected:
69+
////////////////////////////////////////////////////////////
70+
/// \brief Default constructor
7771
///
7872
////////////////////////////////////////////////////////////
79-
void* getValue() const;
73+
AudioResource();
8074

8175
private:
82-
8376
////////////////////////////////////////////////////////////
8477
// Member data
8578
////////////////////////////////////////////////////////////
86-
priv::ThreadLocalImpl* m_impl; ///< Pointer to the OS specific implementation
79+
std::shared_ptr<void> m_device; //!< Sound device
8780
};
8881

8982
} // namespace sf
9083

9184

92-
#endif // SFML_THREADLOCAL_HPP
93-
94-
9585
////////////////////////////////////////////////////////////
96-
/// \class sf::ThreadLocal
97-
/// \ingroup system
86+
/// \class sf::AudioResource
87+
/// \ingroup audio
9888
///
99-
/// This class manipulates void* parameters and thus is not
100-
/// appropriate for strongly-typed variables. You should rather
101-
/// use the sf::ThreadLocalPtr template class.
89+
/// This class is for internal use only, it must be the base
90+
/// of every class that requires a valid audio device in
91+
/// order to work.
10292
///
10393
////////////////////////////////////////////////////////////
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
////////////////////////////////////////////////////////////
2+
//
3+
// SFML - Simple and Fast Multimedia Library
4+
// Copyright (C) 2007-2025 Laurent Gomila ([email protected])
5+
//
6+
// This software is provided 'as-is', without any express or implied warranty.
7+
// In no event will the authors be held liable for any damages arising from the use of this software.
8+
//
9+
// Permission is granted to anyone to use this software for any purpose,
10+
// including commercial applications, and to alter it and redistribute it freely,
11+
// subject to the following restrictions:
12+
//
13+
// 1. The origin of this software must not be misrepresented;
14+
// you must not claim that you wrote the original software.
15+
// If you use this software in a product, an acknowledgment
16+
// in the product documentation would be appreciated but is not required.
17+
//
18+
// 2. Altered source versions must be plainly marked as such,
19+
// and must not be misrepresented as being the original software.
20+
//
21+
// 3. This notice may not be removed or altered from any source distribution.
22+
//
23+
////////////////////////////////////////////////////////////
24+
25+
#pragma once
26+
27+
////////////////////////////////////////////////////////////
28+
// Headers
29+
////////////////////////////////////////////////////////////
30+
#include <SFML/Config.hpp>
31+
32+
33+
////////////////////////////////////////////////////////////
34+
// Portable import / export macros
35+
////////////////////////////////////////////////////////////
36+
#if defined(SFML_AUDIO_EXPORTS)
37+
38+
#define SFML_AUDIO_API SFML_API_EXPORT
39+
40+
#else
41+
42+
#define SFML_AUDIO_API SFML_API_IMPORT
43+
44+
#endif

0 commit comments

Comments
 (0)