I'm getting sound, but it's distorted somehow. i have a flac encoding example: out.flac (right-click -> save as)
does it sound like there has been an effect applied to the sound, maybe two? what are they? and if anyone has suggestions on my code let me know.
i've been trying different algorithms (in C), but they have been a variation of the following:
CODE
float inSample;
FLAC__int32 outSample;
if (inSample > 1.0) { inSample = 1.0; }
else if (inSample < -1.0) { inSample = -1.0; }
if (inSample >= 0) {
outSample = (FLAC__int32) lrintf(inSample * 32767.0);
} else {
outSample = (FLAC__int32) lrintf(inSample * 32768.0);
}
FLAC__int32 outSample;
if (inSample > 1.0) { inSample = 1.0; }
else if (inSample < -1.0) { inSample = -1.0; }
if (inSample >= 0) {
outSample = (FLAC__int32) lrintf(inSample * 32767.0);
} else {
outSample = (FLAC__int32) lrintf(inSample * 32768.0);
}
