- 最後登錄
- 2023-5-14
- 在線時間
- 831 小時
- 註冊時間
- 2007-9-29
- 閱讀權限
- 70
- 精華
- 0
- UID
- 2440043
- 帖子
- 2979
- 積分
- 12825 點
- 潛水值
- 41478 米
| 分享使你變得更實在,可以使其他人感到快樂,分享是我們的動力。今天就來分享你的資訊、圖片或檔案吧。 - /*
- * filename : PlaySound.c
- * author : eyny @ goodbye_myloves
- * compiler : Visual C++ 2008
- *
- */
- #pragma comment(lib, "Winmm.lib")
- #include <stdio.h>
- #include <windows.h>
- #define PLAY_TIME 30000 /* Play 5 mins */
- int main()
- {
- int n;
- puts("1 : Play Loop");
- puts("2 : Play Once");
- scanf("%d", &n);
- if(n==1) PlaySound("test.wav", NULL, SND_FILENAME|SND_NOSTOP);
- else PlaySound("", NULL, NULL, SND_FILENAME|SND_ASYNC ), Sleep(PLAY_TIME);
- return 0;
- }
複製代碼 其它的自己去研究吧..... |
|