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
|
@ -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