Answers for "how to play audio on cpp"

C++
0

play audio c++

mciSendString("open \"*.mp3\" type mpegvideo alias mp3", NULL, 0, NULL);
Posted by: Guest on July-12-2021
0

how to play sound in c++

#include <iostream>
#include <windows.h>
#include <mmsystem.h>
using namespace std;

int main(){
    //PlaySound(TEXT("mywavsound.wav"), NULL, SND_FILENAME); - My erroring code
    PlaySound(TEXT("mywavsound.wav"), NULL, SND_FILENAME | SND_ASYNC);// - the correct code
        
    int test = 0;
    cin>>test;
    return 0;
}
Posted by: Guest on January-24-2022

Browse Popular Code Answers by Language