| 1 |
using System; |
| 2 |
using System.Collections.Generic; |
| 3 |
|
| 4 |
namespace Oni.Metadata |
| 5 |
{ |
| 6 |
internal class SoundMetadata |
| 7 |
{ |
| 8 |
public const int OSAm = 0x4f53416d; |
| 9 |
public const int OSGr = 0x4f534772; |
| 10 |
public const int OSIm = 0x4f53496d; |
| 11 |
|
| 12 |
public enum OSAmPriority : uint |
| 13 |
{ |
| 14 |
Low, |
| 15 |
Normal, |
| 16 |
High, |
| 17 |
Highest |
| 18 |
} |
| 19 |
|
| 20 |
[Flags] |
| 21 |
public enum OSAmFlags : uint |
| 22 |
{ |
| 23 |
None = 0x0000, |
| 24 |
InterruptTracksOnStop = 0x0001, |
| 25 |
PlayOnce = 0x0002, |
| 26 |
CanPan = 0x0004 |
| 27 |
} |
| 28 |
|
| 29 |
public static readonly MetaStruct osam4 = new MetaStruct("OSAm", |
| 30 |
new Field(MetaType.Enum<OSAmPriority>(), "Priority"), |
| 31 |
new Field(MetaType.Enum<OSAmFlags>(), "Flags"), |
| 32 |
new Field(new MetaStruct("OSAmDetailTrackProperties", |
| 33 |
new Field(MetaType.Float, "SphereRadius"), |
| 34 |
new Field(new MetaStruct( |
| 35 |
new Field(MetaType.Float, "Min"), |
| 36 |
new Field(MetaType.Float, "Max")), |
| 37 |
"ElapsedTime")), |
| 38 |
"DetailTrackProperties"), |
| 39 |
new Field(new MetaStruct( |
| 40 |
new Field(new MetaStruct( |
| 41 |
new Field(MetaType.Float, "Min"), |
| 42 |
new Field(MetaType.Float, "Max")), |
| 43 |
"Distance")), |
| 44 |
"Volume"), |
| 45 |
new Field(MetaType.String32, "DetailTrack"), |
| 46 |
new Field(MetaType.String32, "BaseTrack1"), |
| 47 |
new Field(MetaType.String32, "BaseTrack2"), |
| 48 |
new Field(MetaType.String32, "InSound"), |
| 49 |
new Field(MetaType.String32, "OutSound")); |
| 50 |
|
| 51 |
public static readonly MetaStruct osam5 = new MetaStruct("OSAm5", osam4, |
| 52 |
new Field(MetaType.UInt32, "Treshold")); |
| 53 |
|
| 54 |
public static readonly MetaStruct osam6 = new MetaStruct("OSAm6", osam5, |
| 55 |
new Field(MetaType.Float, "MinOcclusion")); |
| 56 |
|
| 57 |
public enum OSImPriority : uint |
| 58 |
{ |
| 59 |
Low, |
| 60 |
Normal, |
| 61 |
High, |
| 62 |
Highest |
| 63 |
} |
| 64 |
|
| 65 |
public static readonly MetaStruct osim3 = new MetaStruct("OSIm3", |
| 66 |
new Field(MetaType.String32, "Group"), |
| 67 |
new Field(MetaType.Enum<OSImPriority>(), "Priority"), |
| 68 |
new Field(new MetaStruct("OSImVolume", |
| 69 |
new Field(new MetaStruct("OSImDistance", |
| 70 |
new Field(MetaType.Float, "Min"), |
| 71 |
new Field(MetaType.Float, "Max")), |
| 72 |
"Distance"), |
| 73 |
new Field(new MetaStruct("OSImAngle", |
| 74 |
new Field(MetaType.Float, "Min"), |
| 75 |
new Field(MetaType.Float, "Max"), |
| 76 |
new Field(MetaType.Float, "MinAttenuation")), |
| 77 |
"Angle")), |
| 78 |
"Volume")); |
| 79 |
|
| 80 |
public static readonly MetaStruct osim4 = new MetaStruct("OSIm4", osim3, |
| 81 |
new Field(new MetaStruct("OSImAlternateImpulse", |
| 82 |
new Field(MetaType.UInt32, "Treshold"), |
| 83 |
new Field(MetaType.String32, "Impulse")), "AlternateImpulse")); |
| 84 |
|
| 85 |
public static readonly MetaStruct osim5 = new MetaStruct("OSIm5", osim4, |
| 86 |
new Field(MetaType.Float, "ImpactVelocity")); |
| 87 |
|
| 88 |
public static readonly MetaStruct osim6 = new MetaStruct("OSIm6", osim5, |
| 89 |
new Field(MetaType.Float, "MinOcclusion")); |
| 90 |
|
| 91 |
[Flags] |
| 92 |
public enum OSGrFlags : ushort |
| 93 |
{ |
| 94 |
None = 0x0000, |
| 95 |
PreventRepeat = 0x0001 |
| 96 |
} |
| 97 |
|
| 98 |
public static readonly MetaStruct osgrPermutation = new MetaStruct("Permutation", |
| 99 |
new Field(MetaType.Int32, "Weight"), |
| 100 |
new Field(new MetaStruct( |
| 101 |
new Field(MetaType.Float, "Min"), |
| 102 |
new Field(MetaType.Float, "Max")), |
| 103 |
"Volume"), |
| 104 |
new Field(new MetaStruct( |
| 105 |
new Field(MetaType.Float, "Min"), |
| 106 |
new Field(MetaType.Float, "Max")), |
| 107 |
"Pitch"), |
| 108 |
new Field(MetaType.String32, "Sound")); |
| 109 |
|
| 110 |
public static readonly MetaStruct osgr1 = new MetaStruct("OSGr", |
| 111 |
new Field(MetaType.Int32, "NumberOfChannels"), |
| 112 |
new Field(MetaType.VarArray(osgrPermutation), "Permutations")); |
| 113 |
|
| 114 |
public static readonly MetaStruct osgr2 = new MetaStruct("OSGr", |
| 115 |
new Field(MetaType.Float, "Volume"), |
| 116 |
new Field(MetaType.Int32, "NumberOfChannels"), |
| 117 |
new Field(MetaType.VarArray(osgrPermutation), "Permutations")); |
| 118 |
|
| 119 |
public static readonly MetaStruct osgr3 = new MetaStruct("OSGr", |
| 120 |
new Field(MetaType.Float, "Volume"), |
| 121 |
new Field(MetaType.Float, "Pitch"), |
| 122 |
new Field(MetaType.Int32, "NumberOfChannels"), |
| 123 |
new Field(MetaType.VarArray(osgrPermutation), "Permutations")); |
| 124 |
|
| 125 |
public static readonly MetaStruct osgr6 = new MetaStruct("OSGr", |
| 126 |
new Field(MetaType.Float, "Volume"), |
| 127 |
new Field(MetaType.Float, "Pitch"), |
| 128 |
new Field(MetaType.Enum<OSGrFlags>(), "Flags"), |
| 129 |
new Field(MetaType.Padding(2)), |
| 130 |
new Field(MetaType.Int32, "NumberOfChannels"), |
| 131 |
new Field(MetaType.VarArray(osgrPermutation), "Permutations")); |
| 132 |
} |
| 133 |
} |