File: 02_example-open.diff

package info (click to toggle)
libofa 0.9.3-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,092 kB
  • sloc: cpp: 24,487; sh: 8,366; makefile: 48; ansic: 14
file content (20 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: fix an issue.
Author: Lukáš Lalinský <lalinsky@gmail.com>
Last-Update: 2006-08-22
Index: libofa-0.9.3/examples/wavefile.cpp
===================================================================
--- libofa-0.9.3.orig/examples/wavefile.cpp
+++ libofa-0.9.3/examples/wavefile.cpp
@@ -42,7 +42,11 @@ AudioData* loadWaveFile(char *file) {
     int srate = 0;
     int channels = 0;
 
-    int fd = open(file, O_RDONLY | 0x8000);
+#ifdef WIN32
+    int fd = open(file, O_RDONLY | O_BINARY);
+#else
+    int fd = open(file, O_RDONLY);
+#endif
     if (fd == -1)
 	return 0;