Skip to content

Commit

Permalink
Merge pull request Kode#1421 from AndreiRudenko/main
Browse files Browse the repository at this point in the history
Fix uncompress stereo ogg files
  • Loading branch information
RobDangerous authored Jun 26, 2022
2 parents f000c0b + b7ea565 commit 9512661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/kha/Sound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class Sound implements Resource {
}
else {
length = samples / samplesPerSecond;
uncompressedData = new kha.arrays.Float32Array(samples * 2);
for (i in 0...samples * 2) {
untyped __cpp__("*((float*)&this->uncompressedData->self.data[({0} * 2) * 4]) = data[{0}] / 32767.0f", i);
uncompressedData = new kha.arrays.Float32Array(samples);
for (i in 0...samples) {
untyped __cpp__("*((float*)&this->uncompressedData->self.data[{0} * 4]) = data[{0}] / 32767.0f", i);
}
}
this.channels = channels;
Expand Down

0 comments on commit 9512661

Please sign in to comment.