From ebd1b636e5bf0f8fa6d210690582757e8b47f141 Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Fri, 8 May 2015 21:14:39 +0100 Subject: Imported Upstream version 2.3+dfsg --- include/SFML/Audio/Music.hpp | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'include/SFML/Audio/Music.hpp') diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index 99b7dac..a502724 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2014 Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2015 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. @@ -30,6 +30,7 @@ //////////////////////////////////////////////////////////// #include #include +#include #include #include #include @@ -38,11 +39,6 @@ namespace sf { -namespace priv -{ - class SoundFile; -} - class InputStream; //////////////////////////////////////////////////////////// @@ -70,9 +66,8 @@ public: /// /// This function doesn't start playing the music (call play() /// to do so). - /// Here is a complete list of all the supported audio formats: - /// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, - /// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64. + /// See the documentation of sf::InputSoundFile for the list + /// of supported formats. /// /// \param filename Path of the music file to open /// @@ -88,9 +83,8 @@ public: /// /// This function doesn't start playing the music (call play() /// to do so). - /// Here is a complete list of all the supported audio formats: - /// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, - /// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64. + /// 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 @@ -111,9 +105,8 @@ public: /// /// This function doesn't start playing the music (call play() /// to do so). - /// Here is a complete list of all the supported audio formats: - /// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, - /// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64. + /// 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 @@ -170,7 +163,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::SoundFile* m_file; ///< Sound file + InputSoundFile m_file; ///< The streamed music file Time m_duration; ///< Music duration std::vector m_samples; ///< Temporary buffer of samples Mutex m_mutex; ///< Mutex protecting the data @@ -186,13 +179,13 @@ private: /// \class sf::Music /// \ingroup audio /// -/// Music objects are sounds that are streamed rather than -/// completely loaded in memory. This is especially useful for -/// compressed music that usually takes hundreds of MB when it is +/// Musics are sounds that are streamed rather than completely +/// loaded in memory. This is especially useful for compressed +/// 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. /// -/// Apart from that, sf::Music has almost the same features as +/// Apart from that, a sf::Music has almost the same features as /// the sf::SoundBuffer / sf::Sound pair: you can play/pause/stop /// it, request its parameters (channels, sample rate), change /// the way it is played (pitch, volume, 3D position, ...), etc. -- cgit v1.2.3