Fixed Listener's functions being private in SFML.Net
Added a function to set a sound's position relative to the listener git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1059 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
631bcc8c5f
commit
40b4bda26b
20 changed files with 295 additions and 52 deletions
|
@ -21,11 +21,13 @@ EXPORTS
|
|||
sfMusic_SetPitch
|
||||
sfMusic_SetVolume
|
||||
sfMusic_SetPosition
|
||||
sfMusic_SetRelativeToListener
|
||||
sfMusic_SetMinDistance
|
||||
sfMusic_SetAttenuation
|
||||
sfMusic_GetPitch
|
||||
sfMusic_GetVolume
|
||||
sfMusic_GetPosition
|
||||
sfMusic_IsRelativeToListener
|
||||
sfMusic_GetMinDistance
|
||||
sfMusic_GetAttenuation
|
||||
sfMusic_GetPlayingOffset
|
||||
|
@ -42,12 +44,14 @@ EXPORTS
|
|||
sfSound_SetPitch
|
||||
sfSound_SetVolume
|
||||
sfSound_SetPosition
|
||||
sfSound_SetRelativeToListener
|
||||
sfSound_SetMinDistance
|
||||
sfSound_SetAttenuation
|
||||
sfSound_SetPlayingOffset
|
||||
sfSound_GetPitch
|
||||
sfSound_GetVolume
|
||||
sfSound_GetPosition
|
||||
sfSound_IsRelativeToListener
|
||||
sfSound_GetPlayingOffset
|
||||
sfSound_GetMinDistance
|
||||
sfSound_GetAttenuation
|
||||
|
@ -84,12 +88,14 @@ EXPORTS
|
|||
sfSoundStream_SetPitch
|
||||
sfSoundStream_SetVolume
|
||||
sfSoundStream_SetPosition
|
||||
sfSoundStream_SetRelativeToListener
|
||||
sfSoundStream_SetMinDistance
|
||||
sfSoundStream_SetAttenuation
|
||||
sfSoundStream_SetLoop
|
||||
sfSoundStream_GetPitch
|
||||
sfSoundStream_GetVolume
|
||||
sfSoundStream_GetPosition
|
||||
sfSoundStream_IsRelativeToListener
|
||||
sfSoundStream_GetMinDistance
|
||||
sfSoundStream_GetAttenuation
|
||||
sfSoundStream_GetLoop
|
||||
|
|
|
@ -21,11 +21,13 @@ EXPORTS
|
|||
sfMusic_SetPitch
|
||||
sfMusic_SetVolume
|
||||
sfMusic_SetPosition
|
||||
sfMusic_SetRelativeToListener
|
||||
sfMusic_SetMinDistance
|
||||
sfMusic_SetAttenuation
|
||||
sfMusic_GetPitch
|
||||
sfMusic_GetVolume
|
||||
sfMusic_GetPosition
|
||||
sfMusic_IsRelativeToListener
|
||||
sfMusic_GetMinDistance
|
||||
sfMusic_GetAttenuation
|
||||
sfMusic_GetPlayingOffset
|
||||
|
@ -42,12 +44,14 @@ EXPORTS
|
|||
sfSound_SetPitch
|
||||
sfSound_SetVolume
|
||||
sfSound_SetPosition
|
||||
sfSound_SetRelativeToListener
|
||||
sfSound_SetMinDistance
|
||||
sfSound_SetAttenuation
|
||||
sfSound_SetPlayingOffset
|
||||
sfSound_GetPitch
|
||||
sfSound_GetVolume
|
||||
sfSound_GetPosition
|
||||
sfSound_IsRelativeToListener
|
||||
sfSound_GetPlayingOffset
|
||||
sfSound_GetMinDistance
|
||||
sfSound_GetAttenuation
|
||||
|
@ -84,12 +88,14 @@ EXPORTS
|
|||
sfSoundStream_SetPitch
|
||||
sfSoundStream_SetVolume
|
||||
sfSoundStream_SetPosition
|
||||
sfSoundStream_SetRelativeToListener
|
||||
sfSoundStream_SetMinDistance
|
||||
sfSoundStream_SetAttenuation
|
||||
sfSoundStream_SetLoop
|
||||
sfSoundStream_GetPitch
|
||||
sfSoundStream_GetVolume
|
||||
sfSoundStream_GetPosition
|
||||
sfSoundStream_IsRelativeToListener
|
||||
sfSoundStream_GetMinDistance
|
||||
sfSoundStream_GetAttenuation
|
||||
sfSoundStream_GetLoop
|
||||
|
|
|
@ -184,6 +184,17 @@ CSFML_API void sfMusic_SetVolume(sfMusic* Music, float Volume);
|
|||
////////////////////////////////////////////////////////////
|
||||
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.
|
||||
|
@ -237,6 +248,17 @@ CSFML_API float sfMusic_GetVolume(sfMusic* Music);
|
|||
////////////////////////////////////////////////////////////
|
||||
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
|
||||
///
|
||||
|
|
|
@ -150,6 +150,17 @@ CSFML_API void sfSound_SetVolume(sfSound* Sound, float Volume);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPosition(sfSound* Sound, float X, float Y, float Z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param Relative : True to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetRelativeToListener(sfSound* Sound, sfBool Relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the sound at its maximum volume.
|
||||
|
@ -212,6 +223,17 @@ CSFML_API float sfSound_GetVolume(sfSound* Sound);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_GetPosition(sfSound* Sound, float* X, float* Y, float* Z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
///
|
||||
/// \param Sound : Sound to check
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* Sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound
|
||||
///
|
||||
|
|
|
@ -157,6 +157,17 @@ CSFML_API void sfSoundStream_SetVolume(sfSoundStream* SoundStream, float Volume)
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPosition(sfSoundStream* SoundStream, float X, float Y, float Z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound stream's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param Relative : True to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* SoundStream, sfBool Relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the sound stream at its maximum volume.
|
||||
|
@ -219,6 +230,17 @@ CSFML_API float sfSoundStream_GetVolume(sfSoundStream* SoundStream);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_GetPosition(sfSoundStream* SoundStream, float* X, float* Y, float* Z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound stream's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
///
|
||||
/// \param SoundStream : Sound stream to check
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* SoundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound stream
|
||||
///
|
||||
|
|
|
@ -198,6 +198,17 @@ 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)
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfMusic_SetRelativeToListener(sfMusic* music, sfBool Relative)
|
||||
{
|
||||
CSFML_CALL(music, SetRelativeToListener(Relative == sfTrue));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the music at its maximum volume.
|
||||
|
@ -255,6 +266,16 @@ 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
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* Music)
|
||||
{
|
||||
CSFML_CALL_RETURN(Music, IsRelativeToListener(), sfFalse);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a music
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -168,6 +168,17 @@ void sfSound_SetPosition(sfSound* Sound, float X, float Y, float Z)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSound_SetRelativeToListener(sfSound* Sound, sfBool Relative)
|
||||
{
|
||||
CSFML_CALL(Sound, SetRelativeToListener(Relative == sfTrue));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the sound at its maximum volume.
|
||||
|
@ -231,6 +242,16 @@ void sfSound_GetPosition(sfSound* Sound, float* X, float* Y, float* Z)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* Sound)
|
||||
{
|
||||
CSFML_CALL_RETURN(Sound, IsRelativeToListener(), sfFalse);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -195,6 +195,17 @@ void sfSoundStream_SetPosition(sfSoundStream* SoundStream, float X, float Y, flo
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound stream's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSoundStream_SetRelativeToListener(sfSoundStream* SoundStream, sfBool Relative)
|
||||
{
|
||||
CSFML_CALL(SoundStream, SetRelativeToListener(Relative == sfTrue));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the sound stream at its maximum volume.
|
||||
|
@ -258,6 +269,16 @@ void sfSoundStream_GetPosition(sfSoundStream* SoundStream, float* X, float* Y, f
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound stream's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* SoundStream)
|
||||
{
|
||||
CSFML_CALL_RETURN(SoundStream, IsRelativeToListener(), sfFalse);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound stream
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue