Browse Source

Update sound.cpp

pull/4/head
galaxyhaxz 8 years ago committed by GitHub
parent
commit
1120c0780d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Source/sound.cpp

2
Source/sound.cpp

@ -367,7 +367,7 @@ void __fastcall sound_create_primary_buffer(int music_track)
a2.cbSize = 0;
}
a2.nChannels = 2;
a2.nBlockAlign = 2 * a2.wBitsPerSample / 8; // a2.nChannels * x / 8 (BUG_FIX: per MSDN)
a2.nBlockAlign = 2 * a2.wBitsPerSample / 8; /// BUGFIX: should be `a2.nChannels * a2.wBitsPerSample / 8`
a2.nAvgBytesPerSec = a2.nSamplesPerSec * a2.nBlockAlign;
sglpDSB->SetFormat(&a2);
}

Loading…
Cancel
Save