-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2999135
commit b07c9ca
Showing
50 changed files
with
2,257 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System.Runtime.InteropServices; | ||
using SFML.System; | ||
|
||
namespace SFML.Audio | ||
{ | ||
//////////////////////////////////////////////////////////// | ||
/// <summary> | ||
/// Structure defining the properties of a directional cone | ||
/// <para/> | ||
/// Sounds will play at gain 1 when they are positioned | ||
/// within the inner angle of the cone. Sounds will play | ||
/// at outerGain when they are positioned outside the | ||
/// outer angle of the cone. The gain declines linearly | ||
/// from 1 to outerGain as the sound moves from the inner | ||
/// angle to the outer angle. | ||
/// </summary> | ||
//////////////////////////////////////////////////////////// | ||
public struct Cone | ||
{ | ||
/// <summary>Inner angle</summary> | ||
public Angle InnerAngle; | ||
|
||
/// <summary>Outer angle</summary> | ||
public Angle OuterAngle; | ||
|
||
/// <summary>Outer angle</summary> | ||
public float OuterGain; | ||
|
||
[StructLayout(LayoutKind.Sequential)] | ||
internal struct MarshalData | ||
{ | ||
public float InnerAngleDegrees; | ||
public float OuterAngleDegrees; | ||
public float OuterGain; | ||
} | ||
|
||
// Return a marshalled version of the instance, that can directly be passed to the C API | ||
internal MarshalData Marshal() | ||
{ | ||
var data = new MarshalData | ||
{ | ||
InnerAngleDegrees = InnerAngle.Degrees, | ||
OuterAngleDegrees = OuterAngle.Degrees, | ||
OuterGain = OuterGain | ||
}; | ||
|
||
return data; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace SFML.Audio | ||
{ | ||
//////////////////////////////////////////////////////////// | ||
/// <summary> | ||
/// Types of sound channels that can be read/written from sound buffers/files | ||
/// <para/> | ||
/// In multi-channel audio, each sound channel can be | ||
/// assigned a position. The position of the channel is | ||
/// used to determine where to place a sound when it | ||
/// is spatialised. Assigning an incorrect sound channel | ||
/// will result in multi-channel audio being positioned | ||
/// incorrectly when using spatialisation. | ||
/// </summary> | ||
//////////////////////////////////////////////////////////// | ||
#pragma warning disable CS1591 // TODO: add documentation when available | ||
public enum SoundChannel | ||
{ | ||
Unspecified, | ||
Mono, | ||
FrontLeft, | ||
FrontRight, | ||
FrontCenter, | ||
FrontLeftOfCenter, | ||
FrontRightOfCenter, | ||
LowFrequencyEffects, | ||
BackLeft, | ||
BackRight, | ||
BackCenter, | ||
SideLeft, | ||
SideRight, | ||
TopCenter, | ||
TopFrontLeft, | ||
TopFrontRight, | ||
TopFrontCenter, | ||
TopBackLeft, | ||
TopBackRight, | ||
TopBackCenter | ||
} | ||
#pragma warning restore CS1591 | ||
} |
Oops, something went wrong.