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:
laurentgom 2009-03-22 18:36:03 +00:00
parent 631bcc8c5f
commit 40b4bda26b
20 changed files with 295 additions and 52 deletions

View file

@ -165,6 +165,19 @@ namespace SFML
set {sfMusic_SetPosition(This, value.X, value.Y, value.Z);}
}
////////////////////////////////////////////////////////////
/// <summary>
/// Is the music's position relative to the listener's position,
/// or is it absolute?
/// Default value is false (absolute)
/// </summary>
////////////////////////////////////////////////////////////
public bool RelativeToListener
{
get {return sfMusic_IsRelativeToListener(This);}
set {sfMusic_SetRelativeToListener(This, value);}
}
////////////////////////////////////////////////////////////
/// <summary>
/// Minimum distance of the music. Closer than this distance,
@ -213,70 +226,76 @@ namespace SFML
}
#region Imports
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfMusic_CreateFromFile(string Filename);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
unsafe static extern IntPtr sfMusic_CreateFromMemory(char* Data, uint SizeInBytes);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_Destroy(IntPtr MusicStream);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_Play(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_Pause(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_Stop(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern SoundStatus sfMusic_GetStatus(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern float sfMusic_GetDuration(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern uint sfMusic_GetChannelsCount(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern uint sfMusic_GetSampleRate(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetPitch(IntPtr Music, float Pitch);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetLoop(IntPtr Music, bool Loop);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetVolume(IntPtr Music, float Volume);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetPosition(IntPtr Music, float X, float Y, float Z);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetRelativeToListener(IntPtr Music, bool Relative);
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetMinDistance(IntPtr Music, float MinDistance);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_SetAttenuation(IntPtr Music, float Attenuation);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern bool sfMusic_GetLoop(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern float sfMusic_GetPitch(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern float sfMusic_GetVolume(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfMusic_GetPosition(IntPtr Music, out float X, out float Y, out float Z);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern bool sfMusic_IsRelativeToListener(IntPtr Music);
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern float sfMusic_GetMinDistance(IntPtr Music);
[DllImport("csfml-audio")]
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern float sfMusic_GetAttenuation(IntPtr Music);
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]