From c2a2445897af17adb56a32dcf111312763a575d4 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 2 Jul 2018 01:06:39 +0200 Subject: initial commit Signed-off-by: Toni Uhlig --- .../CSFML-2.1/doc/html/SoundStream_8h.htm | 907 +++++++++++++++++++++ 1 file changed, 907 insertions(+) create mode 100755 libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundStream_8h.htm (limited to 'libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundStream_8h.htm') diff --git a/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundStream_8h.htm b/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundStream_8h.htm new file mode 100755 index 0000000..47fd309 --- /dev/null +++ b/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/SoundStream_8h.htm @@ -0,0 +1,907 @@ + + + + CSFML - C binding of the Simple and Fast Multimedia Library + + + + + + +
+ + + + +
+
+ +
+
SoundStream.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Data Structures

struct  sfSoundStreamChunk
 defines the data to fill by the OnGetData callback More...
 
+ + + + + + + +

+Typedefs

typedef sfBool(* sfSoundStreamGetDataCallback )(sfSoundStreamChunk *, void *)
 Type of the callback used to get a sound stream data.
 
typedef void(* sfSoundStreamSeekCallback )(sfTime, void *)
 Type of the callback used to seek in a sound stream.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

CSFML_AUDIO_API sfSoundStreamsfSoundStream_create (sfSoundStreamGetDataCallback onGetData, sfSoundStreamSeekCallback onSeek, unsigned int channelCount, unsigned int sampleRate, void *userData)
 Create a new sound stream.
 
CSFML_AUDIO_API void sfSoundStream_destroy (sfSoundStream *soundStream)
 Destroy a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_play (sfSoundStream *soundStream)
 Start or resume playing a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_pause (sfSoundStream *soundStream)
 Pause a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_stop (sfSoundStream *soundStream)
 Stop playing a sound stream.
 
CSFML_AUDIO_API sfSoundStatus sfSoundStream_getStatus (const sfSoundStream *soundStream)
 Get the current status of a sound stream (stopped, paused, playing)
 
CSFML_AUDIO_API unsigned int sfSoundStream_getChannelCount (const sfSoundStream *soundStream)
 Return the number of channels of a sound stream.
 
CSFML_AUDIO_API unsigned int sfSoundStream_getSampleRate (const sfSoundStream *soundStream)
 Get the sample rate of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setPitch (sfSoundStream *soundStream, float pitch)
 Set the pitch of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setVolume (sfSoundStream *soundStream, float volume)
 Set the volume of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setPosition (sfSoundStream *soundStream, sfVector3f position)
 Set the 3D position of a sound stream in the audio scene.
 
CSFML_AUDIO_API void sfSoundStream_setRelativeToListener (sfSoundStream *soundStream, sfBool relative)
 Make a sound stream's position relative to the listener or absolute.
 
CSFML_AUDIO_API void sfSoundStream_setMinDistance (sfSoundStream *soundStream, float distance)
 Set the minimum distance of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setAttenuation (sfSoundStream *soundStream, float attenuation)
 Set the attenuation factor of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setPlayingOffset (sfSoundStream *soundStream, sfTime timeOffset)
 Change the current playing position of a sound stream.
 
CSFML_AUDIO_API void sfSoundStream_setLoop (sfSoundStream *soundStream, sfBool loop)
 Set whether or not a sound stream should loop after reaching the end.
 
CSFML_AUDIO_API float sfSoundStream_getPitch (const sfSoundStream *soundStream)
 Get the pitch of a sound stream.
 
CSFML_AUDIO_API float sfSoundStream_getVolume (const sfSoundStream *soundStream)
 Get the volume of a sound stream.
 
CSFML_AUDIO_API sfVector3f sfSoundStream_getPosition (const sfSoundStream *soundStream)
 Get the 3D position of a sound stream in the audio scene.
 
CSFML_AUDIO_API sfBool sfSoundStream_isRelativeToListener (const sfSoundStream *soundStream)
 Tell whether a sound stream's position is relative to the listener or is absolute.
 
CSFML_AUDIO_API float sfSoundStream_getMinDistance (const sfSoundStream *soundStream)
 Get the minimum distance of a sound stream.
 
CSFML_AUDIO_API float sfSoundStream_getAttenuation (const sfSoundStream *soundStream)
 Get the attenuation factor of a sound stream.
 
CSFML_AUDIO_API sfBool sfSoundStream_getLoop (const sfSoundStream *soundStream)
 Tell whether or not a sound stream is in loop mode.
 
CSFML_AUDIO_API sfTime sfSoundStream_getPlayingOffset (const sfSoundStream *soundStream)
 Get the current playing position of a sound stream.
 
+

Typedef Documentation

+ +
+
+ + + + +
typedef sfBool(* sfSoundStreamGetDataCallback)(sfSoundStreamChunk *, void *)
+
+ +

Type of the callback used to get a sound stream data.

+ +

Definition at line 48 of file SoundStream.h.

+ +
+
+ +
+
+ + + + +
typedef void(* sfSoundStreamSeekCallback)(sfTime, void *)
+
+ +

Type of the callback used to seek in a sound stream.

+ +

Definition at line 49 of file SoundStream.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API sfSoundStream* sfSoundStream_create (sfSoundStreamGetDataCallback onGetData,
sfSoundStreamSeekCallback onSeek,
unsigned int channelCount,
unsigned int sampleRate,
void * userData 
)
+
+ +

Create a new sound stream.

+
Parameters
+ + + + + + +
onGetDataFunction called when the stream needs more data (can't be NULL)
onSeekFunction called when the stream seeks (can't be NULL)
channelCountNumber of channels to use (1 = mono, 2 = stereo)
sampleRateSample rate of the sound (44100 = CD quality)
userDataData to pass to the callback functions
+
+
+
Returns
A new sfSoundStream object
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_destroy (sfSoundStreamsoundStream)
+
+ +

Destroy a sound stream.

+
Parameters
+ + +
soundStreamSound stream to destroy
+
+
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API float sfSoundStream_getAttenuation (const sfSoundStreamsoundStream)
+
+ +

Get the attenuation factor of a sound stream.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Attenuation factor of the stream
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API unsigned int sfSoundStream_getChannelCount (const sfSoundStreamsoundStream)
+
+ +

Return the number of channels of a sound stream.

+

1 channel means a mono sound, 2 means stereo, etc.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Number of channels
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API sfBool sfSoundStream_getLoop (const sfSoundStreamsoundStream)
+
+ +

Tell whether or not a sound stream is in loop mode.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
sfTrue if the music is looping, sfFalse otherwise
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API float sfSoundStream_getMinDistance (const sfSoundStreamsoundStream)
+
+ +

Get the minimum distance of a sound stream.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Minimum distance of the stream
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API float sfSoundStream_getPitch (const sfSoundStreamsoundStream)
+
+ +

Get the pitch of a sound stream.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Pitch of the stream
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API sfTime sfSoundStream_getPlayingOffset (const sfSoundStreamsoundStream)
+
+ +

Get the current playing position of a sound stream.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Current playing position
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API sfVector3f sfSoundStream_getPosition (const sfSoundStreamsoundStream)
+
+ +

Get the 3D position of a sound stream in the audio scene.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Position of the stream in the world
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API unsigned int sfSoundStream_getSampleRate (const sfSoundStreamsoundStream)
+
+ +

Get the sample rate of a sound stream.

+

The sample rate is the number of audio samples played per second. The higher, the better the quality.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Sample rate, in number of samples per second
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API sfSoundStatus sfSoundStream_getStatus (const sfSoundStreamsoundStream)
+
+ +

Get the current status of a sound stream (stopped, paused, playing)

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Current status
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API float sfSoundStream_getVolume (const sfSoundStreamsoundStream)
+
+ +

Get the volume of a sound stream.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
Volume of the stream, in the range [0, 100]
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API sfBool sfSoundStream_isRelativeToListener (const sfSoundStreamsoundStream)
+
+ +

Tell whether a sound stream's position is relative to the listener or is absolute.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+
Returns
sfTrue if the position is relative, sfFalse if it's absolute
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_pause (sfSoundStreamsoundStream)
+
+ +

Pause a sound stream.

+

This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_play (sfSoundStreamsoundStream)
+
+ +

Start or resume playing a sound stream.

+

This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from beginning if it was it already playing. This function uses its own thread so that it doesn't block the rest of the program while the music is played.

+
Parameters
+ + +
soundStreamSound stream object
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setAttenuation (sfSoundStreamsoundStream,
float attenuation 
)
+
+ +

Set the attenuation factor of a sound stream.

+

The attenuation is a multiplicative factor which makes the stream more or less loud according to its distance from the listener. An attenuation of 0 will produce a non-attenuated stream, i.e. its volume will always be the same whether it is heard from near or from far. On the other hand, an attenuation value such as 100 will make the stream fade out very quickly as it gets further from the listener. The default value of the attenuation is 1.

+
Parameters
+ + + +
soundStreamSound stream object
attenuationNew attenuation factor of the stream
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setLoop (sfSoundStreamsoundStream,
sfBool loop 
)
+
+ +

Set whether or not a sound stream should loop after reaching the end.

+

If set, the stream will restart from beginning after reaching the end and so on, until it is stopped or sfSoundStream_setLoop(stream, sfFalse) is called. The default looping state for sound streams is false.

+
Parameters
+ + + +
soundStreamSound stream object
loopsfTrue to play in loop, sfFalse to play once
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setMinDistance (sfSoundStreamsoundStream,
float distance 
)
+
+ +

Set the minimum distance of a sound stream.

+

The "minimum distance" of a stream is the maximum distance at which it is heard at its maximum volume. Further than the minimum distance, it will start to fade out according to its attenuation factor. A value of 0 ("inside the head +of the listener") is an invalid value and is forbidden. The default value of the minimum distance is 1.

+
Parameters
+ + + +
soundStreamSound stream object
distanceNew minimum distance of the stream
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setPitch (sfSoundStreamsoundStream,
float pitch 
)
+
+ +

Set the pitch of a sound stream.

+

The pitch represents the perceived fundamental frequency of a sound; thus you can make a stream more acute or grave by changing its pitch. A side effect of changing the pitch is to modify the playing speed of the stream as well. The default value for the pitch is 1.

+
Parameters
+ + + +
soundStreamSound stream object
pitchNew pitch to apply to the stream
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setPlayingOffset (sfSoundStreamsoundStream,
sfTime timeOffset 
)
+
+ +

Change the current playing position of a sound stream.

+

The playing position can be changed when the stream is either paused or playing.

+
Parameters
+ + + +
soundStreamSound stream object
timeOffsetNew playing position
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setPosition (sfSoundStreamsoundStream,
sfVector3f position 
)
+
+ +

Set the 3D position of a sound stream in the audio scene.

+

Only streams with one channel (mono streams) can be spatialized. The default position of a stream is (0, 0, 0).

+
Parameters
+ + + +
soundStreamSound stream object
positionPosition of the stream in the scene
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setRelativeToListener (sfSoundStreamsoundStream,
sfBool relative 
)
+
+ +

Make a sound stream's position relative to the listener or absolute.

+

Making a stream relative to the listener will ensure that it will always be played the same way regardless the position of the listener. This can be useful for non-spatialized streams, streams that are produced by the listener, or streams attached to it. The default value is false (position is absolute).

+
Parameters
+ + + +
soundStreamSound stream object
relativesfTrue to set the position relative, sfFalse to set it absolute
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_setVolume (sfSoundStreamsoundStream,
float volume 
)
+
+ +

Set the volume of a sound stream.

+

The volume is a value between 0 (mute) and 100 (full volume). The default value for the volume is 100.

+
Parameters
+ + + +
soundStreamSound stream object
volumeVolume of the stream
+
+
+ +
+
+ +
+
+ + + + + + + + +
CSFML_AUDIO_API void sfSoundStream_stop (sfSoundStreamsoundStream)
+
+ +

Stop playing a sound stream.

+

This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike sfSoundStream_pause).

+
Parameters
+ + +
soundStreamSound stream object
+
+
+ +
+
+
+ + + + -- cgit v1.2.3