PlaySound function resides in the windows.h header file that plays the specified wav sound. We included #pragma comment( lib, "Winmm.lib" ) at the top of the source because we had to instruct the linker to add this additional dependency. #pragma comment is used to specify linker options.
PlaySound function resides in the windows.h header file that plays the specified wav sound. We included #pragma comment( lib, "Winmm.lib" ) at the top of the source because we had to instruct the linker to add this additional dependency. #pragma comment is used to specify linker options.
Hope this clarifies and solves your question.
thanks for your replay but i got this error
error C2065: 'nullptr' : undeclared identifier
edit:i fix it but this will playing all the time how can i do it play one time and then stop?
Originally Posted by makis5
thanks for your replay but i got this error
error C2065: 'nullptr' : undeclared identifier
edit:i fix it but this will playing all the time how can i do it play one time and then stop?
Put the surrounding code. I mean where have you put this code. Post some code and I might be able to help you. For me, it only plays once.
i do that for my panic key just for testing it
@Hassan
so when i enable my panickey in menu it will make the sound but they sound its keep playing..and also its only beeping not doing the chimes sound...
Originally Posted by makis5
i do that for my panic key just for testing it
@Hassan
so when i enable my panickey in menu it will make the sound but they sound its keep playing..and also its only beeping not doing the chimes sound...
Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.
Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.
do you have any time to help me via teamviewer or something?
@Hassan
Originally Posted by Hassan
Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.