MantisBT - Cheat Engine
View Issue Details
0000297Cheat Enginepublic2013-11-03 20:042014-02-13 06:44
Assigned ToDark Byte 
PlatformOSOS Version
Summary0000297: Audio feedback on hotkey
DescriptionIn the table, one can create hotkeys for values, toggles and stuff.
It'd be nice if I could select a WAV file (8/16/24bit mono/stereo, max. 5secs) for each hotkey separately, which, when pressed, would be played, giving an audible feedback that the hotkey has been recognized.

The WAVs should be saved into the table itself for easy distribution.
Alternatively, CE could ship with a set of WAVs (at least two, please), which could be selected for the hotkey from a combobox; users could replace the WAV files themselves to create their own themes.

If WAVs (maybe MP3s?) are too complicated, then a simple 'beep' will do, though it has to come through the audio card because it seems modern PCs are no longer equipped with PC speakers.

Thank you for considering!
Additional InformationI attached two very simple 'tick' WAVs.
I used these two to signal "on"/"off" back in the days when I made trainers instead of tables.
TagsNo tags attached.
Attached Fileszip (1,048) 2013-11-03 20:04

2013-11-20 16:17   
I'm sure you read this topic (you posted here)

And, I made improved v ersion, "customSound" here

You can select a WAV file for each hotkey separately, and you can choose different sound when deactivating, i.e. you have three cheats, three hotkeys, first hotkey will have sound1_ON.wav and sound1_OFF.wav, second hotkey will have sound2_ON.wav and sound2_OFF.wav, third hotkey will have sound3_ON.wav and sound3_OFF.wav.

you add those 6 files to CT, and then you write this Lua code:

soundTable = { "sound1_ON.wav","sound1_OFF.wav", -- hotkey type 1
               "sound2_ON.wav","sound2_OFF.wav", -- hotkey type 2
               "sound3_ON.wav","sound3_OFF.wav" } -- hotkey type 3

And those auto generated functions:

function onPostHotkeyXXXX(Hotkey)
  local memrec=memoryrecordhotkey_getOwner(Hotkey)
  local isActive=memoryrecord_isActive(memrec)
  cheatcomponent_setActive(CETrainer_CHEAT0, isActive)
  if gBeepOnAction then

change to:
function onPostHotkeyXXXX(Hotkey)
  local memrec=memoryrecordhotkey_getOwner(Hotkey)
  local isActive=memoryrecord_isActive(memrec)
  cheatcomponent_setActive(CETrainer_CHEAT0, isActive)
  beep(1,isActive) -- hotkey type is 1

and add this:
function beep(hotkeytype,isActive)
 local OnOrOff = isActive and 0 or 1
 customSound.PlaySound(hotkeytype*2-1 + OnOrOff)

The downside is that CE will freeze once for up to 1s, just after calling function CustomSound.Init().

I think, you can build your own CE, just add this line
"loadlibrary('winmm.dll');" here
CE shouldn't freeze.

To continue CustomSound discussion go here

Of course, this feature officially build-in, would be nice.
2013-11-20 16:38   
Hiya, thanks!
Yes, I remember it well, and yes, it's great stuff for advanced users - those that make trainers.

However, I am after a simplistic version of this that's built into CE itself.
You see, having to build the same thing over and over into every table seems to be a waste of space and time - it'd far more easier to select something from a box and CE could take care of the rest (and users could replace the sound files with whatever they want).
Dark Byte   
2014-02-13 06:44   
This is added to the trainer generator now, including the two sound files

Issue History
2013-11-03 20:04CsimbiNew Issue
2013-11-03 20:04CsimbiFile Added:
2013-11-20 16:17mgr_inz_PlayerNote Added: 0000629
2013-11-20 16:38CsimbiNote Added: 0000630
2014-02-13 06:44Dark ByteNote Added: 0000655
2014-02-13 06:44Dark ByteStatusnew => resolved
2014-02-13 06:44Dark ByteResolutionopen => fixed
2014-02-13 06:44Dark ByteAssigned To => Dark Byte