AAron@image.soe.clarkson.edu (AAron nAAs) (07/08/90)
I am writing an STe digital sample player, and am having a problem with fread. count = fread(buffer, size, n, fp); I give it all the correct parameters, and verified this by printing them out beforehand. The problem is that the command won't ALWAYS read the "n" bytes that I request. "count" ends up less than "n". Since I am doing this several times in a row (and advancing the "buffer") to load large samples, there are gaps in the sample when it is played. Does fread stop when it encounters a certain byte code, thinking it has reached the end of file? AAron nAAs Yes, once I get this STe digital sample player totally working, I WILL post it to the net!! AAron@sun.soe.clarkson.edu
AAron@image.soe.clarkson.edu (AAron nAAs) (07/08/90)
From article <1990Jul7.183335.3152@sun.soe.clarkson.edu>, by AAron@image.soe.clarkson.edu (AAron nAAs): > > The problem is that the command won't ALWAYS read the "n" bytes that I request. > "count" ends up less than "n". > Does fread stop when it encounters a certain byte code, thinking it has > reached the end of file? > > > AAron nAAs Yes, once I get this STe digital sample player totally working, > I WILL post it to the net!! YOU IDIOT! I'll bet your doing an fp=fopen(filename, "r"); try fp=fopen(filename, "rb"); sound samples are BINARY files!!! AAron "oops" nAAs