Simple c++ win console program for audio output? [duplicate]

妖精的绣舞 提交于 2019-12-12 07:02:50

问题


1 - I just want to simply play a .wav audio file in c++ program. I do NOT want make complex things with audio file...like recording or something else...just play it. Is it possible without using specifics audio libraries?? For example, Windows.h.Does it work with simple function or not??

2 - Is it possible to play audio files in console?


回答1:


You can use PlaySound to play a voice file as:

PlaySound(pathToFile, NULL, SND_FILENAME);


来源:https://stackoverflow.com/questions/21362045/simple-c-win-console-program-for-audio-output

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!