fix: restore missing method
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace OCES.Audio
|
||||
{
|
||||
public partial class MusicContainerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 解析拍号字符串(如 "4/4", "3/4"),返回每小节拍数。
|
||||
/// </summary>
|
||||
public static int GetBeatsPerBar(string timeSig)
|
||||
{
|
||||
if (string.IsNullOrEmpty(timeSig)) return 4;
|
||||
string[] parts = timeSig.Split('/');
|
||||
if (parts.Length >= 1 && int.TryParse(parts[0], out int beats))
|
||||
return beats;
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 912df68e106949ff8e532be855ddd448
|
||||
timeCreated: 1776308995
|
||||
Reference in New Issue
Block a user