modifying beep to play wav files.
Posted: Wed Aug 17, 2005 3:20 am
I couldnt find a good forum for this but i thought i would share. Im not a donater so i dont think i have access to the perfect forum.
3 steps and 8 lines keep you away from using your beep to play wave files.
Step #1)
add #include <mmsystem.h> after #include <windows.h> in MQ2Main.h
Step #2)
add winmm.lib to the project settings link file list
Step #3)
text search out the function "MacroBeep" in your project
change the contents to:
USAGE:
normal beeps without line arguments play as beeps. However if you use a line arg file name for a beep that corresponds to a wav file that you have put in your EQ directory then it will play that wave file instead.
For example if you put
"bark.wav" in your eq directory and change your macro to use
/beep bark.wav
then instead of hearing a beep you will hear a bark.
If you prefer you can play the sounds in the everquest "sounds" directory by using something like
/beep sounds/bgb_atk.wav
That plays a funky EQ attack sound.
While not fancy this is fast and easy and provides a way to have lots of different sound feedback. PLEASE NOTE that because of the way macroquest works you must have the wave files in your EVERQUEST directory to play them or a specificable directory under that path similiar to the existing "sounds" folder example. [or you could put them in some totally specified folder i suppose but the overarching point is that the default if no path is specified is in the everquest folder and NOT the macroquest folder]
Maybe there is a better plugin out there but im a little ghetto myself =) so who knows. If theres not this would probably be better as a plugin as it is you have to keep readding it to the macroquest download.
Thought i would share.
Thank you
declspec
3 steps and 8 lines keep you away from using your beep to play wave files.
Step #1)
add #include <mmsystem.h> after #include <windows.h> in MQ2Main.h
Step #2)
add winmm.lib to the project settings link file list
Step #3)
text search out the function "MacroBeep" in your project
change the contents to:
Code: Select all
bRunNextCommand = TRUE;
//Beep(0x500,250);
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if (szArg[0] == 0)
Beep(0x500,250);
else
PlaySound(szArg,0,SND_ASYNC);normal beeps without line arguments play as beeps. However if you use a line arg file name for a beep that corresponds to a wav file that you have put in your EQ directory then it will play that wave file instead.
For example if you put
"bark.wav" in your eq directory and change your macro to use
/beep bark.wav
then instead of hearing a beep you will hear a bark.
If you prefer you can play the sounds in the everquest "sounds" directory by using something like
/beep sounds/bgb_atk.wav
That plays a funky EQ attack sound.
While not fancy this is fast and easy and provides a way to have lots of different sound feedback. PLEASE NOTE that because of the way macroquest works you must have the wave files in your EVERQUEST directory to play them or a specificable directory under that path similiar to the existing "sounds" folder example. [or you could put them in some totally specified folder i suppose but the overarching point is that the default if no path is specified is in the everquest folder and NOT the macroquest folder]
Maybe there is a better plugin out there but im a little ghetto myself =) so who knows. If theres not this would probably be better as a plugin as it is you have to keep readding it to the macroquest download.
Thought i would share.
Thank you
declspec