108 lines
2.3 KiB
C#
108 lines
2.3 KiB
C#
using System.IO;
|
|
|
|
namespace OCES.Audio
|
|
{
|
|
/// <summary>
|
|
/// 替换策略类型
|
|
/// </summary>
|
|
public enum KillMode
|
|
{
|
|
Oldest, // 打断最早开始的
|
|
Newest, // 打断最新开始的
|
|
}
|
|
|
|
/// <summary>
|
|
/// 混音分组
|
|
/// </summary>
|
|
public enum MixingType
|
|
{
|
|
Sfx = 0,
|
|
Voice,
|
|
Accented,
|
|
}
|
|
|
|
/// <summary>
|
|
/// 声音容器类型
|
|
/// </summary>
|
|
public enum ContainerType
|
|
{
|
|
Random = 0,
|
|
Sequence,
|
|
Blend,
|
|
Switch,
|
|
}
|
|
|
|
public enum BlendCrossFadeType
|
|
{
|
|
Exponential = 0,
|
|
Linear,
|
|
Logarithmic,
|
|
}
|
|
|
|
public enum AlignMode
|
|
{
|
|
Immediate,
|
|
Beat,
|
|
Bar,
|
|
}
|
|
|
|
public enum CallbackFlags
|
|
{
|
|
MusicSyncBeat = 1,
|
|
MusicSyncBar = 2,
|
|
MusicSyncGrid = 3,
|
|
}
|
|
|
|
public enum ActiveSoundState
|
|
{
|
|
Pending, // 已进入调度,但还没真正播放
|
|
Playing, // 已经开始播放
|
|
Finished,
|
|
}
|
|
|
|
public enum SyncPoint
|
|
{
|
|
Start,
|
|
SameAsCurrentSegment,
|
|
}
|
|
|
|
public enum SyncSegment
|
|
{
|
|
Start,
|
|
LastPlayedSegment,
|
|
}
|
|
|
|
public interface IBinarySerializable
|
|
{
|
|
void DeSerialize(BinaryReader reader);
|
|
void Serialize(BinaryWriter writer);
|
|
}
|
|
|
|
// ─────────────────────────────────────────────
|
|
// 辅助接口,让泛型方法同时处理 MusicPath 和 AmbiencePath
|
|
// ─────────────────────────────────────────────
|
|
|
|
public interface IPathEntry
|
|
{
|
|
uint Id { get; }
|
|
string Path { get; }
|
|
uint ContainerId { get; }
|
|
int Priority { get; }
|
|
}
|
|
|
|
public interface ITransitionConfig
|
|
{
|
|
float FadeOutOffset { get; }
|
|
float FadeOutTime { get; }
|
|
float FadeInOffset { get; }
|
|
float FadeInTime { get; }
|
|
}
|
|
|
|
public partial class MusicTransition : ITransitionConfig { }
|
|
public partial class AmbienceTransition : ITransitionConfig { }
|
|
|
|
|
|
public partial class MusicPath : IPathEntry { }
|
|
public partial class AmbiencePath : IPathEntry { }
|
|
}
|