more horizontal refactoring
[swftools.git] / lib / example / sound.c
index 08009e8..de86113 100644 (file)
@@ -64,13 +64,13 @@ int main (int argc,char ** argv)
          block[s] = (int)(32767*sin(s*8*3.14159/blocksize));
          if(t==0) block[s] = 0;
       }
-      swf_SetSoundStreamBlock(tag, block, 1);
+      swf_SetSoundStreamBlock(tag, block, 1, 0);
       tag = swf_InsertTag(tag, ST_SHOWFRAME);
   }
   
   tag = swf_InsertTag(tag, ST_END);
 
-  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);