2017-12-13 08:25 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000297Cheat Enginepublic2014-02-13 06:44
ReporterCsimbi 
Assigned ToDark Byte 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
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 Files

-Relationships
+Relationships

-Notes

~0000629

mgr_inz_Player (reporter)

I'm sure you read this topic (you posted here)
forum.cheatengine.org/viewtopic.php?t=559298


And, I made improved v ersion, "customSound" here
forum.cheatengine.org/viewtopic.php?t=565651

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
customSound.Init(soundTable)






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
    beep()
  end
end

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
end

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




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
code.google.com/p/cheat-engine/source/browse/trunk/Cheat%20Engine/symbolhandler.pas#2788
CE shouldn't freeze.


To continue CustomSound discussion go here forum.cheatengine.org/viewtopic.php?t=565651




Of course, this feature officially build-in, would be nice.

~0000630

Csimbi (reporter)

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).

~0000655

Dark Byte (developer)

This is added to the trainer generator now, including the two sound files
playSound(findTableFile("Activate"))
playSound(findTableFile("Deactivate"))
+Notes

-Issue History
Date Modified Username Field Change
2013-11-03 20:04 Csimbi New Issue
2013-11-03 20:04 Csimbi File Added: ticks.zip
2013-11-20 16:17 mgr_inz_Player Note Added: 0000629
2013-11-20 16:38 Csimbi Note Added: 0000630
2014-02-13 06:44 Dark Byte Note Added: 0000655
2014-02-13 06:44 Dark Byte Status new => resolved
2014-02-13 06:44 Dark Byte Resolution open => fixed
2014-02-13 06:44 Dark Byte Assigned To => Dark Byte
+Issue History