summaryrefslogtreecommitdiff
path: root/include/SFML/Audio/Music.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/SFML/Audio/Music.hpp')
-rw-r--r--include/SFML/Audio/Music.hpp33
1 files changed, 13 insertions, 20 deletions
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 <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundStream.hpp>
+#include <SFML/Audio/InputSoundFile.hpp>
#include <SFML/System/Mutex.hpp>
#include <SFML/System/Time.hpp>
#include <string>
@@ -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<Int16> 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.