diff --git a/src/engine/sample.cpp b/src/engine/sample.cpp index ecebcfe74..4d0ec3bb0 100644 --- a/src/engine/sample.cpp +++ b/src/engine/sample.cpp @@ -243,7 +243,7 @@ bool DivSample::save(const char* path) { break; } default: - sf_write_raw(f,data16,length16); + sf_writef_short(f,data16,samples); break; } @@ -909,7 +909,7 @@ void DivSample::render() { data8[i]=data16[i]>>8; } } - if (depth!=DIV_SAMPLE_DEPTH_VOX) { // BRR + if (depth!=DIV_SAMPLE_DEPTH_BRR) { // BRR if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return; // TODO: loop point brrEncode(data16,dataBRR,samples,0);