changeset 69:920107031030 octave-forge

Use 'binary' mode when opening files for reading/writing on Windows
author pkienzle
date Fri, 07 Dec 2001 15:48:01 +0000
parents 2124a73900d5
children c31551201ddc
files main/audio/auload.m main/audio/ausave.m
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/audio/auload.m	Wed Dec 05 05:40:31 2001 +0000
+++ b/main/audio/auload.m	Fri Dec 07 15:48:01 2001 +0000
@@ -47,7 +47,7 @@
   end
   ext = tolower(substr(path, ext+1, length(path)-ext));
 
-  [file, msg] = fopen(path, 'r');
+  [file, msg] = fopen(path, 'rb');
   if (file == -1)
     error([ msg, ": ", path]);
   end
--- a/main/audio/ausave.m	Wed Dec 05 05:40:31 2001 +0000
+++ b/main/audio/ausave.m	Fri Dec 07 15:48:01 2001 +0000
@@ -72,7 +72,7 @@
     end
     datasize = channels*samplesize*samples;
 
-    [file, msg] = fopen(path, 'w');
+    [file, msg] = fopen(path, 'wb');
     if (file == -1)
       error("%s: %s", msg, path);
     end
@@ -131,7 +131,7 @@
     end
     datasize = channels*samplesize*samples;
 
-    [file, msg] = fopen(path, 'w');
+    [file, msg] = fopen(path, 'wb');
     if (file == -1)
       error("%s: %s", msg, path);
     end
@@ -175,7 +175,7 @@
     end
     datasize = channels*samplesize*samples;
 
-    [file, msg] = fopen(path, 'w');
+    [file, msg] = fopen(path, 'wb');
     if (file == -1)
       error("%s: %s", msg, path);
     end