mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Each module now has its own export macro
This commit is contained in:
1 parent
7615382a68
commit
0c5afa3483
70 files changed
+1010
-719
No files matched your search
@@ -0,0 +1,48 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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_AUDIO_EXPORT_H
|
||||
#define SFML_AUDIO_EXPORT_H
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define portable import / export macros
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(CSFML_AUDIO_EXPORTS)
|
||||
|
||||
#define CSFML_AUDIO_API CSFML_API_EXPORT
|
||||
|
||||
#else
|
||||
|
||||
#define CSFML_AUDIO_API CSFML_API_IMPORT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SFML_AUDIO_EXPORT_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \param volume New global volume, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetGlobalVolume(float volume);
|
||||
CSFML_AUDIO_API void sfListener_SetGlobalVolume(float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current value of the global volume
|
||||
@@ -49,7 +49,7 @@ CSFML_API void sfListener_SetGlobalVolume(float volume);
|
||||
/// \return Current global volume, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfListener_GetGlobalVolume(void);
|
||||
CSFML_AUDIO_API float sfListener_GetGlobalVolume(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of the listener in the scene
|
||||
@@ -61,7 +61,7 @@ CSFML_API float sfListener_GetGlobalVolume(void);
|
||||
/// \param z Z coordinate of the listener's position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetPosition(float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfListener_SetPosition(float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of the listener in the scene
|
||||
@@ -71,7 +71,7 @@ CSFML_API void sfListener_SetPosition(float x, float y, float z);
|
||||
/// \param z Z coordinate of the listener's position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the orientation of the listener in the scene
|
||||
@@ -86,7 +86,7 @@ CSFML_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
/// \param z Z coordinate of the listener's orientation
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetDirection(float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfListener_SetDirection(float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current orientation of the listener in the scene
|
||||
@@ -96,7 +96,7 @@ CSFML_API void sfListener_SetDirection(float x, float y, float z);
|
||||
/// \param z Z coordinate of the listener's orientation
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_GetDirection(float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API void sfListener_GetDirection(float* x, float* y, float* z);
|
||||
|
||||
|
||||
#endif // SFML_LISTENER_H
|
||||
+28
-28
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
@@ -50,7 +50,7 @@
|
||||
/// \return A new sfMusic object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
|
||||
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new music and load it from a file in memory
|
||||
@@ -67,7 +67,7 @@ CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
|
||||
/// \return A new sfMusic object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
|
||||
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new music and load it from a custom stream
|
||||
@@ -83,7 +83,7 @@ CSFML_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes
|
||||
/// \return A new sfMusic object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
|
||||
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a music
|
||||
@@ -91,7 +91,7 @@ CSFML_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
|
||||
/// \param music Music to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Destroy(sfMusic* music);
|
||||
CSFML_AUDIO_API void sfMusic_Destroy(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set whether or not a music should loop after reaching the end
|
||||
@@ -105,7 +105,7 @@ CSFML_API void sfMusic_Destroy(sfMusic* music);
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
|
||||
CSFML_AUDIO_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a music is in loop mode
|
||||
@@ -115,7 +115,7 @@ CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
|
||||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
|
||||
CSFML_AUDIO_API sfBool sfMusic_GetLoop(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total duration of a music
|
||||
@@ -125,7 +125,7 @@ CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
|
||||
/// \return Music duration
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfMusic_GetDuration(const sfMusic* music);
|
||||
CSFML_AUDIO_API sfTime sfMusic_GetDuration(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a music
|
||||
@@ -139,7 +139,7 @@ CSFML_API sfTime sfMusic_GetDuration(const sfMusic* music);
|
||||
/// \param music Music object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Play(sfMusic* music);
|
||||
CSFML_AUDIO_API void sfMusic_Play(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Pause a music
|
||||
@@ -150,7 +150,7 @@ CSFML_API void sfMusic_Play(sfMusic* music);
|
||||
/// \param music Music object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Pause(sfMusic* music);
|
||||
CSFML_AUDIO_API void sfMusic_Pause(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop playing a music
|
||||
@@ -162,7 +162,7 @@ CSFML_API void sfMusic_Pause(sfMusic* music);
|
||||
/// \param music Music object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Stop(sfMusic* music);
|
||||
CSFML_AUDIO_API void sfMusic_Stop(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the number of channels of a music
|
||||
@@ -174,7 +174,7 @@ CSFML_API void sfMusic_Stop(sfMusic* music);
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
|
||||
CSFML_AUDIO_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a music
|
||||
@@ -187,7 +187,7 @@ CSFML_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
|
||||
/// \return Sample rate, in number of samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
|
||||
CSFML_AUDIO_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current status of a music (stopped, paused, playing)
|
||||
@@ -197,7 +197,7 @@ CSFML_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
|
||||
/// \return Current status
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
|
||||
CSFML_AUDIO_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current playing position of a music
|
||||
@@ -207,7 +207,7 @@ CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
CSFML_AUDIO_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the pitch of a music
|
||||
@@ -222,7 +222,7 @@ CSFML_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
/// \param pitch New pitch to apply to the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPitch(sfMusic* music, float pitch);
|
||||
CSFML_AUDIO_API void sfMusic_SetPitch(sfMusic* music, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the volume of a music
|
||||
@@ -234,7 +234,7 @@ CSFML_API void sfMusic_SetPitch(sfMusic* music, float pitch);
|
||||
/// \param volume Volume of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetVolume(sfMusic* music, float volume);
|
||||
CSFML_AUDIO_API void sfMusic_SetVolume(sfMusic* music, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the 3D position of a music in the audio scene
|
||||
@@ -249,7 +249,7 @@ CSFML_API void sfMusic_SetVolume(sfMusic* music, float volume);
|
||||
/// \param z Z coordinate of the position of the music in the scene
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make a musics's position relative to the listener or absolute
|
||||
@@ -264,7 +264,7 @@ CSFML_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
|
||||
CSFML_AUDIO_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a music
|
||||
@@ -280,7 +280,7 @@ CSFML_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
|
||||
/// \param distance New minimum distance of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
|
||||
CSFML_AUDIO_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the attenuation factor of a music
|
||||
@@ -298,7 +298,7 @@ CSFML_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
|
||||
/// \param attenuation New attenuation factor of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
|
||||
CSFML_AUDIO_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current playing position of a music
|
||||
@@ -310,7 +310,7 @@ CSFML_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
|
||||
/// \param timeOffset New playing position, in milliseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
|
||||
CSFML_AUDIO_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the pitch of a music
|
||||
@@ -320,7 +320,7 @@ CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
|
||||
/// \return Pitch of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetPitch(const sfMusic* music);
|
||||
CSFML_AUDIO_API float sfMusic_GetPitch(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the volume of a music
|
||||
@@ -330,7 +330,7 @@ CSFML_API float sfMusic_GetPitch(const sfMusic* music);
|
||||
/// \return Volume of the music, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetVolume(const sfMusic* music);
|
||||
CSFML_AUDIO_API float sfMusic_GetVolume(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the 3D position of a music in the audio scene
|
||||
@@ -341,7 +341,7 @@ CSFML_API float sfMusic_GetVolume(const sfMusic* music);
|
||||
/// \param z Z position of the music in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a music's position is relative to the
|
||||
@@ -352,7 +352,7 @@ CSFML_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, flo
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
|
||||
CSFML_AUDIO_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a music
|
||||
@@ -362,7 +362,7 @@ CSFML_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
|
||||
/// \return Minimum distance of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetMinDistance(const sfMusic* music);
|
||||
CSFML_AUDIO_API float sfMusic_GetMinDistance(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the attenuation factor of a music
|
||||
@@ -372,7 +372,7 @@ CSFML_API float sfMusic_GetMinDistance(const sfMusic* music);
|
||||
/// \return Attenuation factor of the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetAttenuation(const sfMusic* music);
|
||||
CSFML_AUDIO_API float sfMusic_GetAttenuation(const sfMusic* music);
|
||||
|
||||
|
||||
#endif // SFML_MUSIC_H
|
||||
+26
-26
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
@@ -40,7 +40,7 @@
|
||||
/// \return A new sfSound object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSound* sfSound_Create(void);
|
||||
CSFML_AUDIO_API sfSound* sfSound_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound by copying an existing one
|
||||
@@ -50,7 +50,7 @@ CSFML_API sfSound* sfSound_Create(void);
|
||||
/// \return A new sfSound object which is a copy of \a sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSound* sfSound_Copy(sfSound* sound);
|
||||
CSFML_AUDIO_API sfSound* sfSound_Copy(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a sound
|
||||
@@ -58,7 +58,7 @@ CSFML_API sfSound* sfSound_Copy(sfSound* sound);
|
||||
/// \param sound Sound to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Destroy(sfSound* sound);
|
||||
CSFML_AUDIO_API void sfSound_Destroy(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a sound
|
||||
@@ -72,7 +72,7 @@ CSFML_API void sfSound_Destroy(sfSound* sound);
|
||||
/// \param sound Sound object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Play(sfSound* sound);
|
||||
CSFML_AUDIO_API void sfSound_Play(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Pause a sound
|
||||
@@ -83,7 +83,7 @@ CSFML_API void sfSound_Play(sfSound* sound);
|
||||
/// \param sound Sound object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Pause(sfSound* sound);
|
||||
CSFML_AUDIO_API void sfSound_Pause(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop playing a sound
|
||||
@@ -95,7 +95,7 @@ CSFML_API void sfSound_Pause(sfSound* sound);
|
||||
/// \param sound Sound object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Stop(sfSound* sound);
|
||||
CSFML_AUDIO_API void sfSound_Stop(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the source buffer containing the audio data to play
|
||||
@@ -108,7 +108,7 @@ CSFML_API void sfSound_Stop(sfSound* sound);
|
||||
/// \param buffer Sound buffer to attach to the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
|
||||
CSFML_AUDIO_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the audio buffer attached to a sound
|
||||
@@ -118,7 +118,7 @@ CSFML_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
|
||||
/// \return Sound buffer attached to the sound (can be NULL)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
|
||||
CSFML_AUDIO_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set whether or not a sound should loop after reaching the end
|
||||
@@ -132,7 +132,7 @@ CSFML_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
|
||||
CSFML_AUDIO_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a soud is in loop mode
|
||||
@@ -142,7 +142,7 @@ CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
|
||||
/// \return sfTrue if the sound is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_GetLoop(const sfSound* sound);
|
||||
CSFML_AUDIO_API sfBool sfSound_GetLoop(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current status of a sound (stopped, paused, playing)
|
||||
@@ -152,7 +152,7 @@ CSFML_API sfBool sfSound_GetLoop(const sfSound* sound);
|
||||
/// \return Current status
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
|
||||
CSFML_AUDIO_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the pitch of a sound
|
||||
@@ -167,7 +167,7 @@ CSFML_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
|
||||
/// \param pitch New pitch to apply to the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPitch(sfSound* sound, float pitch);
|
||||
CSFML_AUDIO_API void sfSound_SetPitch(sfSound* sound, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the volume of a sound
|
||||
@@ -179,7 +179,7 @@ CSFML_API void sfSound_SetPitch(sfSound* sound, float pitch);
|
||||
/// \param volume Volume of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetVolume(sfSound* sound, float volume);
|
||||
CSFML_AUDIO_API void sfSound_SetVolume(sfSound* sound, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the 3D position of a sound in the audio scene
|
||||
@@ -194,7 +194,7 @@ CSFML_API void sfSound_SetVolume(sfSound* sound, float volume);
|
||||
/// \param z Z coordinate of the position of the sound in the scene
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make the sound's position relative to the listener or absolute
|
||||
@@ -209,7 +209,7 @@ CSFML_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
|
||||
CSFML_AUDIO_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a sound
|
||||
@@ -225,7 +225,7 @@ CSFML_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
|
||||
/// \param distance New minimum distance of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetMinDistance(sfSound* sound, float distance);
|
||||
CSFML_AUDIO_API void sfSound_SetMinDistance(sfSound* sound, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the attenuation factor of a sound
|
||||
@@ -243,7 +243,7 @@ CSFML_API void sfSound_SetMinDistance(sfSound* sound, float distance);
|
||||
/// \param attenuation New attenuation factor of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
|
||||
CSFML_AUDIO_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current playing position of a sound
|
||||
@@ -255,7 +255,7 @@ CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
|
||||
/// \param timeOffset New playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
|
||||
CSFML_AUDIO_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the pitch of a sound
|
||||
@@ -265,7 +265,7 @@ CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
|
||||
/// \return Pitch of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetPitch(const sfSound* sound);
|
||||
CSFML_AUDIO_API float sfSound_GetPitch(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the volume of a sound
|
||||
@@ -275,7 +275,7 @@ CSFML_API float sfSound_GetPitch(const sfSound* sound);
|
||||
/// \return Volume of the sound, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetVolume(const sfSound* sound);
|
||||
CSFML_AUDIO_API float sfSound_GetVolume(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the 3D position of a sound in the audio scene
|
||||
@@ -286,7 +286,7 @@ CSFML_API float sfSound_GetVolume(const sfSound* sound);
|
||||
/// \param z Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a sound's position is relative to the
|
||||
@@ -297,7 +297,7 @@ CSFML_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, flo
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
|
||||
CSFML_AUDIO_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a sound
|
||||
@@ -307,7 +307,7 @@ CSFML_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
|
||||
/// \return Minimum distance of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetMinDistance(const sfSound* sound);
|
||||
CSFML_AUDIO_API float sfSound_GetMinDistance(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the attenuation factor of a sound
|
||||
@@ -317,7 +317,7 @@ CSFML_API float sfSound_GetMinDistance(const sfSound* sound);
|
||||
/// \return Attenuation factor of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
|
||||
CSFML_AUDIO_API float sfSound_GetAttenuation(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current playing position of a sound
|
||||
@@ -327,7 +327,7 @@ CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
|
||||
CSFML_AUDIO_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
|
||||
|
||||
|
||||
#endif // SFML_SOUND_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
#include <SFML/System/Time.h>
|
||||
@@ -47,7 +47,7 @@
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer and load it from a file in memory
|
||||
@@ -62,7 +62,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t sizeInBytes);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer and load it from a custom stream
|
||||
@@ -76,7 +76,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer and load it from an array of samples in memory
|
||||
@@ -92,7 +92,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelsCount, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelsCount, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer by copying an existing one
|
||||
@@ -102,7 +102,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples,
|
||||
/// \return A new sfSoundBuffer object which is a copy of \a soundBuffer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a sound buffer
|
||||
@@ -110,7 +110,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
|
||||
/// \param soundBuffer Sound buffer to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save a sound buffer to an audio file
|
||||
@@ -125,7 +125,7 @@ CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
|
||||
/// \return sfTrue if saving succeeded, sfFalse if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
|
||||
CSFML_AUDIO_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the array of audio samples stored in a sound buffer
|
||||
@@ -139,7 +139,7 @@ CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, cons
|
||||
/// \return Read-only pointer to the array of sound samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of samples stored in a sound buffer
|
||||
@@ -152,7 +152,7 @@ CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuff
|
||||
/// \return Number of samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound buffer
|
||||
@@ -166,7 +166,7 @@ CSFML_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
/// \return Sample rate (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of channels used by a sound buffer
|
||||
@@ -179,7 +179,7 @@ CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuf
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total duration of a sound buffer
|
||||
@@ -189,7 +189,7 @@ CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundB
|
||||
/// \return Sound duration
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFER_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/// \return A new sfSoundBufferRecorder object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
|
||||
CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a sound buffer recorder
|
||||
@@ -46,7 +46,7 @@ CSFML_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
|
||||
/// \param soundBufferRecorder Sound buffer recorder to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_AUDIO_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start the capture of a sound recorder recorder
|
||||
@@ -62,7 +62,7 @@ CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferR
|
||||
/// \param sampleRate Desired capture rate, in number of samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop the capture of a sound recorder
|
||||
@@ -70,7 +70,7 @@ CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRec
|
||||
/// \param soundBufferRecorder Sound buffer recorder object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_AUDIO_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound buffer recorder
|
||||
@@ -84,7 +84,7 @@ CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferReco
|
||||
/// \return Sample rate, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sound buffer containing the captured audio data
|
||||
@@ -99,7 +99,7 @@ CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRe
|
||||
/// \return Read-only access to the sound buffer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFERRECORDER_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -49,7 +49,7 @@ typedef void (*sfSoundRecorderStopCallback)(void*);
|
||||
/// \return A new sfSoundRecorder object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
|
||||
CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
|
||||
sfSoundRecorderProcessCallback onProcess,
|
||||
sfSoundRecorderStopCallback onStop,
|
||||
void* userData);
|
||||
@@ -60,7 +60,7 @@ CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback
|
||||
/// \param soundRecorder Sound recorder to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
|
||||
CSFML_AUDIO_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start the capture of a sound recorder
|
||||
@@ -76,7 +76,7 @@ CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
|
||||
/// \param sampleRate Desired capture rate, in number of samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop the capture of a sound recorder
|
||||
@@ -84,7 +84,7 @@ CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned in
|
||||
/// \param soundRecorder Sound recorder object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
|
||||
CSFML_AUDIO_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound recorder
|
||||
@@ -98,7 +98,7 @@ CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
|
||||
/// \return Sample rate, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
|
||||
CSFML_AUDIO_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if the system supports audio capture
|
||||
@@ -110,7 +110,7 @@ CSFML_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soun
|
||||
/// \return sfTrue if audio capture is supported, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundRecorder_IsAvailable(void);
|
||||
CSFML_AUDIO_API sfBool sfSoundRecorder_IsAvailable(void);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDRECORDER_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Export.h>
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
@@ -60,7 +60,7 @@ typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///<
|
||||
/// \return A new sfSoundStream object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
|
||||
CSFML_AUDIO_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
|
||||
sfSoundStreamSeekCallback onSeek,
|
||||
unsigned int channelCount,
|
||||
unsigned int sampleRate,
|
||||
@@ -72,7 +72,7 @@ CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGet
|
||||
/// \param soundStream Sound stream to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a sound stream
|
||||
@@ -86,7 +86,7 @@ CSFML_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Play(sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API void sfSoundStream_Play(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Pause a sound stream
|
||||
@@ -97,7 +97,7 @@ CSFML_API void sfSoundStream_Play(sfSoundStream* soundStream);
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Pause(sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API void sfSoundStream_Pause(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop playing a sound stream
|
||||
@@ -109,7 +109,7 @@ CSFML_API void sfSoundStream_Pause(sfSoundStream* soundStream);
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API void sfSoundStream_Stop(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current status of a sound stream (stopped, paused, playing)
|
||||
@@ -119,7 +119,7 @@ CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
|
||||
/// \return Current status
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the number of channels of a sound stream
|
||||
@@ -131,7 +131,7 @@ CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound stream
|
||||
@@ -144,7 +144,7 @@ CSFML_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundS
|
||||
/// \return Sample rate, in number of samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the pitch of a sound stream
|
||||
@@ -159,7 +159,7 @@ CSFML_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStr
|
||||
/// \param pitch New pitch to apply to the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the volume of a sound stream
|
||||
@@ -171,7 +171,7 @@ CSFML_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
|
||||
/// \param volume Volume of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the 3D position of a sound stream in the audio scene
|
||||
@@ -186,7 +186,7 @@ CSFML_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume)
|
||||
/// \param z Z coordinate of the position of the stream in the scene
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make a sound stream's position relative to the listener or absolute
|
||||
@@ -201,7 +201,7 @@ CSFML_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, fl
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, sfBool relative);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a sound stream
|
||||
@@ -217,7 +217,7 @@ CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, s
|
||||
/// \param distance New minimum distance of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float distance);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the attenuation factor of a sound stream
|
||||
@@ -235,7 +235,7 @@ CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float di
|
||||
/// \param attenuation New attenuation factor of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float attenuation);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current playing position of a sound stream
|
||||
@@ -247,7 +247,7 @@ CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float at
|
||||
/// \param timeOffset New playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime timeOffset);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set whether or not a sound stream should loop after reaching the end
|
||||
@@ -261,7 +261,7 @@ CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
|
||||
CSFML_AUDIO_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the pitch of a sound stream
|
||||
@@ -271,7 +271,7 @@ CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
|
||||
/// \return Pitch of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the volume of a sound stream
|
||||
@@ -281,7 +281,7 @@ CSFML_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
|
||||
/// \return Volume of the stream, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the 3D position of a sound stream in the audio scene
|
||||
@@ -292,7 +292,7 @@ CSFML_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
|
||||
/// \param z Z position of the stream in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
CSFML_AUDIO_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a sound stream's position is relative to the
|
||||
@@ -303,7 +303,7 @@ CSFML_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a sound stream
|
||||
@@ -313,7 +313,7 @@ CSFML_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundSt
|
||||
/// \return Minimum distance of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the attenuation factor of a sound stream
|
||||
@@ -323,7 +323,7 @@ CSFML_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
|
||||
/// \return Attenuation factor of the stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a sound stream is in loop mode
|
||||
@@ -333,7 +333,7 @@ CSFML_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
|
||||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current playing position of a sound stream
|
||||
@@ -343,7 +343,7 @@ CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API sfTime sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDSTREAM_H
|
||||
Reference in new issue
Block a user