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 StardewValley.TerrainFeatures;
|
||||
using StardewValley.Locations;
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
|
||||
namespace stardew_access
|
||||
{
|
||||
|
@ -214,6 +215,25 @@ namespace stardew_access
|
|||
});
|
||||
#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.GameLoop.UpdateTicked += this.onUpdateTicked;
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ namespace stardew_access.Patches
|
|||
if (Context.IsPlayerFree)
|
||||
ScreenReader.sayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
else
|
||||
ScreenReader.sayWithMenuChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
ScreenReader.sayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue