-
-
Notifications
You must be signed in to change notification settings - Fork 84
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 a9b6675
Showing
56 changed files
with
2,304 additions
and
1,042 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
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,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
Oops, something went wrong.