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);