Trying to add custom sounds
parent
4ec08076a7
commit
d9b92e7203
Binary file not shown.
|
@ -10,6 +10,7 @@ using AutoHotkey.Interop;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using StardewValley.TerrainFeatures;
|
using StardewValley.TerrainFeatures;
|
||||||
using StardewValley.Locations;
|
using StardewValley.Locations;
|
||||||
|
using Microsoft.Xna.Framework.Audio;
|
||||||
|
|
||||||
namespace stardew_access
|
namespace stardew_access
|
||||||
{
|
{
|
||||||
|
@ -214,6 +215,25 @@ namespace stardew_access
|
||||||
});
|
});
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Custom Sounds
|
||||||
|
/*CueDefinition myCueDefinition = new CueDefinition();
|
||||||
|
|
||||||
|
// Adding the name for the cue, which will be
|
||||||
|
// the name of the audio to play when using sound functions.
|
||||||
|
myCueDefinition.name = "myNewSound";
|
||||||
|
// If this sound is played multiple times in quick succession,
|
||||||
|
// only one sound instance will play at a time.
|
||||||
|
myCueDefinition.instanceLimit = 1;
|
||||||
|
myCueDefinition.limitBehavior = CueDefinition.LimitBehavior.ReplaceOldest;
|
||||||
|
// Get the audio file and add it to a SoundEffect.
|
||||||
|
SoundEffect sound_effect;
|
||||||
|
string filePathCombined = Path.Combine(this.Helper.DirectoryPath, "mySound.wav");
|
||||||
|
using (var stream = new System.IO.FileStream(filePathCombined, System.IO.FileMode.Open))
|
||||||
|
{
|
||||||
|
sound_effect = SoundEffect.FromStream(stream);
|
||||||
|
}*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
|
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
|
||||||
helper.Events.GameLoop.UpdateTicked += this.onUpdateTicked;
|
helper.Events.GameLoop.UpdateTicked += this.onUpdateTicked;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ namespace stardew_access.Patches
|
||||||
if (Context.IsPlayerFree)
|
if (Context.IsPlayerFree)
|
||||||
ScreenReader.sayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
ScreenReader.sayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||||
else
|
else
|
||||||
ScreenReader.sayWithMenuChecker(toSpeak.ToString(), true); // Normal Checker
|
ScreenReader.sayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue