repo.or.cz
/
QFreeRecite.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improve the windows respond by using thread
[QFreeRecite.git]
/
src
/
aplay
/
aplay.c
blob
725327ac99f0129ff919e6a4164ff80b31856291
1
// compiling with mingw: gcc -mwindows playsound.c -lwinmm -o playsound.exe
2
// strip playsound.exe
3
#include <windows.h>
4
#include <stdio.h>
5
6
int
main
(
int
argc
,
char
*
argv
[]) {
7
if
(
argc
==
1
) {
8
printf
(
"%s <soundfile>
\n
"
,
argv
[
0
]);
9
exit
(
0
);
10
}
11
12
if
(!
PlaySound
(
argv
[
1
],
0
,
SND_FILENAME
)) {
13
printf
(
"error playing file
\n
"
);
14
}
15
return
0
;
16
}