+ 4

Sound

Can we produce an ultrasound by using c++

28th Nov 2018, 2:13 PM
Sudhanshu Sharma
Sudhanshu Sharma - avatar
3 ответов
+ 8
Sudhanshu Sharma This is a hardware problem. Your speakers, if they support ultrasonic frequency generation, can be asked to do so using a C++ program. If your hardware supports the operation, then you can play the audio file using the function mciSendString on a Windows machine. https://stackoverflow.com/questions/22253074/how-to-play-or-open-mp3-or-wav-sound-file-in-c-program https://docs.microsoft.com/en-us/previous-versions/dd757161(v%3Dvs.85) You can also download and use external libraries like SDL or SFML to do the same. Here is some more information related to your query: https://electronics.stackexchange.com/questions/156197/can-computer-speakers-emit-ultrasound https://www.pcreview.co.uk/threads/playing-ultrasounds-through-pc-speakers.2834372/
28th Nov 2018, 3:47 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 9
I am not sure of ultrasound we can produce sound in audible range using c/c++ https://stackoverflow.com/questions/4060601/make-sounds-beep-with-c
28th Nov 2018, 2:52 PM
Rstar
Rstar - avatar
+ 4
Thanks
28th Nov 2018, 4:01 PM
Sudhanshu Sharma
Sudhanshu Sharma - avatar