Wav music packs now work correctly. WOOT!
This commit is contained in:
parent
def22386c5
commit
fd53797c5f
|
@ -111,6 +111,7 @@ namespace StardewSymphonyRemastered.Framework
|
|||
|
||||
byteArray = reader.ReadBytes(dataSize);
|
||||
|
||||
|
||||
dynamicSound = new DynamicSoundEffectInstance(sampleRate, (AudioChannels)channels);
|
||||
count = dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(10000));
|
||||
|
||||
|
@ -119,8 +120,19 @@ namespace StardewSymphonyRemastered.Framework
|
|||
}
|
||||
|
||||
void DynamicSound_BufferNeeded(object sender, EventArgs e)
|
||||
{
|
||||
//StardewSymphony.ModMonitor.Log(byteArray.Length.ToString());
|
||||
//StardewSymphony.ModMonitor.Log(position.ToString());
|
||||
//StardewSymphony.ModMonitor.Log(count.ToString());
|
||||
try
|
||||
{
|
||||
dynamicSound.SubmitBuffer(byteArray, position, count);
|
||||
}
|
||||
catch(Exception err)
|
||||
{
|
||||
StardewSymphony.ModMonitor.Log(err.ToString(), StardewModdingAPI.LogLevel.Error);
|
||||
}
|
||||
|
||||
//dynamicSound.SubmitBuffer(byteArray);
|
||||
//dynamicSound.SubmitBuffer(byteArray, position + count / 2, count / 2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue