mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 12:25:05 +00:00
fix loading 8-bit samples
This commit is contained in:
parent
327952f3f4
commit
cdbcf7fcd3
1 changed files with 1 additions and 1 deletions
|
@ -2234,7 +2234,7 @@ int DivEngine::addSampleFromFile(const char* path) {
|
|||
for (int i=0; i<si.frames*si.channels; i+=si.channels) {
|
||||
int averaged=0;
|
||||
for (int j=0; j<si.channels; j++) {
|
||||
averaged+=((unsigned char*)buf)[i+j];
|
||||
averaged+=((int)((unsigned char*)buf)[i+j])-128;
|
||||
}
|
||||
averaged/=si.channels;
|
||||
sample->data8[index++]=averaged;
|
||||
|
|
Loading…
Reference in a new issue