/usr/include/SFML/Audio/Music.h is in libcsfml-dev 1.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | ////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// 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_H
#define SFML_MUSIC_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/SoundStatus.h>
#include <SFML/Audio/Types.h>
////////////////////////////////////////////////////////////
/// Create a new music and load it from a file
///
/// \param Filename : Path of the music file to open
///
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfMusic* sfMusic_CreateFromFile(const char* Filename);
////////////////////////////////////////////////////////////
/// Create a new music and load it from a file in memory
///
/// \param Data : Pointer to the file data in memory
/// \param SizeInBytes : Size of the data to load, in bytes
///
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfMusic* sfMusic_CreateFromMemory(const char* Data, size_t SizeInBytes);
////////////////////////////////////////////////////////////
/// Destroy an existing music
///
/// \param Music : Music to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Destroy(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Set a music loop state
///
/// \param Music : Music to set the loop state
/// \param Loop : sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetLoop(sfMusic* Music, sfBool Loop);
////////////////////////////////////////////////////////////
/// Tell whether or not a music is looping
///
/// \param Music : Music to get the loop state from
///
/// \return sfTrue if the music is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfMusic_GetLoop(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get a music duration
///
/// \param Music : Music to get the duration from
///
/// \return Music duration, in seconds
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetDuration(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Start playing a music
///
/// \param Music : Music to play
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Play(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Pause a music
///
/// \param Music : Music to pause
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Pause(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Stop playing a music
///
/// \param Music : Music to stop
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Stop(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Return the number of channels of a music (1 = mono, 2 = stereo)
///
/// \param Music : Music to get the channels count from
///
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfMusic_GetChannelsCount(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the stream sample rate of a music
///
/// \param Music : Music to get the sample rate from
///
/// \return Stream frequency (number of samples per second)
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfMusic_GetSampleRate(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the status of a music (stopped, paused, playing)
///
/// \param Music : Music to get the status from
///
/// \return Current status of the sound
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundStatus sfMusic_GetStatus(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the current playing position of a music
///
/// \param Music : Music to get the position from
///
/// \return Current playing position, expressed in seconds
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetPlayingOffset(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Set the pitch of a music
///
/// \param Music : Music to modify
/// \param Pitch : New pitch
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetPitch(sfMusic* Music, float Pitch);
////////////////////////////////////////////////////////////
/// Set the volume of a music
///
/// \param Music : Music to modify
/// \param Volume : Volume (in range [0, 100])
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetVolume(sfMusic* Music, float Volume);
////////////////////////////////////////////////////////////
/// Set the position of a music
///
/// \param Music : Music to modify
/// \param X : X position of the sound in the world
/// \param Y : Y position of the sound in the world
/// \param Z : Z position of the sound in the world
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetPosition(sfMusic* Music, float X, float Y, float Z);
////////////////////////////////////////////////////////////
/// Make the music's position relative to the listener's
/// position, or absolute.
/// The default value is false (absolute)
///
/// \param Music : Music to modify
/// \param Relative : True to set the position relative, false to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetRelativeToListener(sfMusic* Music, sfBool Relative);
////////////////////////////////////////////////////////////
/// Set the minimum distance - closer than this distance,
/// the listener will hear the music at its maximum volume.
/// The default minimum distance is 1.0
///
/// \param Music : Music to modify
/// \param MinDistance : New minimum distance for the music
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetMinDistance(sfMusic* Music, float MinDistance);
////////////////////////////////////////////////////////////
/// Set the attenuation factor - the higher the attenuation, the
/// more the sound will be attenuated with distance from listener.
/// The default attenuation factor 1.0
///
/// \param Sound : Sound to modify
/// \param Attenuation : New attenuation factor for the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetAttenuation(sfMusic* Music, float Attenuation);
////////////////////////////////////////////////////////////
/// Get the pitch of a music
///
/// \param Music : Music to get the pitch from
///
/// \return Pitch value
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetPitch(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the volume of a music
///
/// \param Music : Music to get the volume from
///
/// \return Volume value (in range [1, 100])
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetVolume(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the position of a music
///
/// \param Music : Music to get the position from
/// \param X : X position of the sound in the world
/// \param Y : Y position of the sound in the world
/// \param Z : Z position of the sound in the world
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_GetPosition(sfMusic* Music, float* X, float* Y, float* Z);
////////////////////////////////////////////////////////////
/// Tell if the music's position is relative to the listener's
/// position, or if it's absolute
///
/// \param Music : Music to check
///
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the minimum distance of a music
///
/// \param Music : Music to get the minimum distance from
///
/// \return Minimum distance for the music
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetMinDistance(sfMusic* Music);
////////////////////////////////////////////////////////////
/// Get the attenuation factor of a music
///
/// \param Music : Music to get the attenuation factor from
///
/// \return Attenuation factor for the a music
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetAttenuation(sfMusic* Music);
#endif // SFML_MUSIC_H
|