2022年5月30日 星期一

XC 的筆記

    15-1:播放音效

程式碼:

#include <windows.h>

int main()

{

    PlaySound("07042111.wav",NULL,SND_SYNC);

}

15-2:ASYNC(不同步)

程式碼:

#include <windows.h>

#include <stdio.h>

int main()

{

    printf("現在在PlaySound()前\n");

    PlaySound("07042111.wav", NULL, SND_ASYNC);

    printf("現在在PlaySound()後\n");

    int N;

    scanf("%d", &N);

}

    15-3:CMP3

程式碼:
#include "CMP3_MCI.h"
#include <stdio.h>
CMP3_MCI mp3;
int main()
{
    mp3.Load("07042111.mp3");
    mp3.Play();
    printf("現在正在播放\n");
    int N;///卡住,不要結束
    scanf("%d",&N);
}




 


沒有留言:

張貼留言