diff options
author | James Cowgill <james410@cowgill.org.uk> | 2015-07-04 22:12:30 +0100 |
---|---|---|
committer | James Cowgill <james410@cowgill.org.uk> | 2015-07-04 22:12:30 +0100 |
commit | 232f6c9906817eee494907d7bbe8ddf2dacf8fbf (patch) | |
tree | 086a0fa3a2dc8a97e68e12f76c6982340a6b58c9 /include | |
parent | c8f7e7bae794277dfa6599b67001b1e9499f0132 (diff) |
Imported Upstream version 2.3.1+dfsg
Diffstat (limited to 'include')
-rw-r--r-- | include/SFML/Audio/Music.hpp | 24 | ||||
-rw-r--r-- | include/SFML/Audio/SoundRecorder.hpp | 4 | ||||
-rw-r--r-- | include/SFML/Config.hpp | 2 | ||||
-rw-r--r-- | include/SFML/Graphics/Font.hpp | 16 | ||||
-rw-r--r-- | include/SFML/Graphics/RenderStates.hpp | 2 | ||||
-rw-r--r-- | include/SFML/Graphics/Shader.hpp | 2 | ||||
-rw-r--r-- | include/SFML/Graphics/Texture.hpp | 2 | ||||
-rw-r--r-- | include/SFML/System/FileInputStream.hpp | 2 | ||||
-rw-r--r-- | include/SFML/Window/Joystick.hpp | 2 |
9 files changed, 37 insertions, 19 deletions
diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index a502724..76b4254 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -69,6 +69,10 @@ public: /// See the documentation of sf::InputSoundFile for the list /// of supported formats. /// + /// \warning Since the music is not loaded at once but rather + /// streamed continuously, the file must remain accessible until + /// the sf::Music object loads a new music or is destroyed. + /// /// \param filename Path of the music file to open /// /// \return True if loading succeeded, false if it failed @@ -85,10 +89,11 @@ public: /// to do so). /// See the documentation of sf::InputSoundFile for the list /// of supported formats. - /// Since the music is not loaded completely but rather streamed - /// continuously, the \a data must remain available as long as the - /// music is playing (i.e. you can't deallocate it right after calling - /// this function). + /// + /// \warning Since the music is not loaded at once but rather streamed + /// continuously, the \a data buffer must remain accessible until + /// the sf::Music object loads a new music or is destroyed. That is, + /// you can't deallocate the buffer right after calling this function. /// /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes @@ -107,10 +112,10 @@ public: /// to do so). /// See the documentation of sf::InputSoundFile for the list /// of supported formats. - /// Since the music is not loaded completely but rather streamed - /// continuously, the \a stream must remain alive as long as the - /// music is playing (i.e. you can't destroy it right after calling - /// this function). + /// + /// \warning Since the music is not loaded at once but rather + /// streamed continuously, the \a stream must remain accessible + /// until the sf::Music object loads a new music or is destroyed. /// /// \param stream Source stream to read from /// @@ -184,6 +189,9 @@ private: /// musics that usually take hundreds of MB when they are /// uncompressed: by streaming it instead of loading it entirely, /// you avoid saturating the memory and have almost no loading delay. +/// This implies that the underlying resource (file, stream or +/// memory buffer) must remain valid for the lifetime of the +/// sf::Music object. /// /// Apart from that, a sf::Music has almost the same features as /// the sf::SoundBuffer / sf::Sound pair: you can play/pause/stop diff --git a/include/SFML/Audio/SoundRecorder.hpp b/include/SFML/Audio/SoundRecorder.hpp index ab0eb24..964e4f3 100644 --- a/include/SFML/Audio/SoundRecorder.hpp +++ b/include/SFML/Audio/SoundRecorder.hpp @@ -183,7 +183,7 @@ protected: /// \param interval Processing interval /// //////////////////////////////////////////////////////////// - void setProcessingInterval(sf::Time interval); + void setProcessingInterval(Time interval); //////////////////////////////////////////////////////////// /// \brief Start capturing audio data @@ -260,7 +260,7 @@ private: Thread m_thread; ///< Thread running the background recording task std::vector<Int16> m_samples; ///< Buffer to store captured samples unsigned int m_sampleRate; ///< Sample rate - sf::Time m_processingInterval; ///< Time period between calls to onProcessSamples + Time m_processingInterval; ///< Time period between calls to onProcessSamples bool m_isCapturing; ///< Capturing state std::string m_deviceName; ///< Name of the audio capture device }; diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 58e9797..294f282 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// #define SFML_VERSION_MAJOR 2 #define SFML_VERSION_MINOR 3 -#define SFML_VERSION_PATCH 0 +#define SFML_VERSION_PATCH 1 //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 84eee27..2b19d39 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -95,6 +95,10 @@ public: /// fonts installed on the user's system, thus you can't /// load them directly. /// + /// \warning SFML cannot preload all the font data in this + /// function, so the file has to remain accessible until + /// the sf::Font object loads a new font or is destroyed. + /// /// \param filename Path of the font file to load /// /// \return True if loading succeeded, false if it failed @@ -109,9 +113,11 @@ public: /// /// The supported font formats are: TrueType, Type 1, CFF, /// OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42. - /// Warning: SFML cannot preload all the font data in this + /// + /// \warning SFML cannot preload all the font data in this /// function, so the buffer pointed by \a data has to remain - /// valid as long as the font is used. + /// valid until the sf::Font object loads a new font or + /// is destroyed. /// /// \param data Pointer to the file data in memory /// \param sizeInBytes Size of the data to load, in bytes @@ -132,6 +138,10 @@ public: /// function, so the contents of \a stream have to remain /// valid as long as the font is used. /// + /// \warning SFML cannot preload all the font data in this + /// function, so the stream has to remain accessible until + /// the sf::Font object loads a new font or is destroyed. + /// /// \param stream Source stream to read from /// /// \return True if loading succeeded, false if it failed @@ -278,7 +288,7 @@ private: Page(); GlyphTable glyphs; ///< Table mapping code points to their corresponding glyph - sf::Texture texture; ///< Texture containing the pixels of the glyphs + Texture texture; ///< Texture containing the pixels of the glyphs unsigned int nextRow; ///< Y position of the next new row in the texture std::vector<Row> rows; ///< List containing the position of all the existing rows }; diff --git a/include/SFML/Graphics/RenderStates.hpp b/include/SFML/Graphics/RenderStates.hpp index b23a778..3ab3271 100644 --- a/include/SFML/Graphics/RenderStates.hpp +++ b/include/SFML/Graphics/RenderStates.hpp @@ -150,7 +150,7 @@ public: /// directly without defining render states explicitly -- the /// default set of states is ok in most cases. /// \code -/// window.Draw(sprite); +/// window.draw(sprite); /// \endcode /// /// If you want to use a single specific render state, diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index d3278f9..55cc3bb 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -399,7 +399,7 @@ public: /// \param transform Transform to assign /// //////////////////////////////////////////////////////////// - void setParameter(const std::string& name, const sf::Transform& transform); + void setParameter(const std::string& name, const Transform& transform); //////////////////////////////////////////////////////////// /// \brief Change a texture parameter of the shader diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp index 421861e..29260d1 100644 --- a/include/SFML/Graphics/Texture.hpp +++ b/include/SFML/Graphics/Texture.hpp @@ -187,7 +187,7 @@ public: /// \see loadFromFile, loadFromMemory, loadFromImage /// //////////////////////////////////////////////////////////// - bool loadFromStream(sf::InputStream& stream, const IntRect& area = IntRect()); + bool loadFromStream(InputStream& stream, const IntRect& area = IntRect()); //////////////////////////////////////////////////////////// /// \brief Load the texture from an image diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index 1afa939..995351c 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -123,7 +123,7 @@ private: // Member data //////////////////////////////////////////////////////////// #ifdef ANDROID - sf::priv::ResourceStream *m_file; + priv::ResourceStream* m_file; #else std::FILE* m_file; ///< stdio file stream #endif diff --git a/include/SFML/Window/Joystick.hpp b/include/SFML/Window/Joystick.hpp index 185fd76..27f6291 100644 --- a/include/SFML/Window/Joystick.hpp +++ b/include/SFML/Window/Joystick.hpp @@ -77,7 +77,7 @@ public: { Identification(); - sf::String name; ///< Name of the joystick + String name; ///< Name of the joystick unsigned int vendorId; ///< Manufacturer identifier unsigned int productId; ///< Product identifier }; |