# HG changeset patch # User Ritor1 # Date 1408684011 -21600 # Node ID 908baf8e7d2316d7f597d933fbeb518996ee2090 # Parent acac52e9e36a42bde49da764d6aa24196efb9719 WAVE_FORMAT diff -r acac52e9e36a -r 908baf8e7d23 AudioPlayer.cpp --- a/AudioPlayer.cpp Thu Aug 21 11:24:51 2014 +0600 +++ b/AudioPlayer.cpp Fri Aug 22 11:06:51 2014 +0600 @@ -2260,12 +2260,12 @@ { while ( 1 ) { - pcmWaveFormat.wf.wFormatTag = 1; - pcmWaveFormat.wf.nChannels = channels;// Channels: 1 = mono, 2 = stereo - pcmWaveFormat.wf.nSamplesPerSec = v0; - pcmWaveFormat.wf.nBlockAlign = channels * bitsPerSample / 8; + pcmWaveFormat.wf.wFormatTag = WAVE_FORMAT_PCM; + pcmWaveFormat.wf.nChannels = channels; // Channels: 1 = mono, 2 = stereo + pcmWaveFormat.wf.nSamplesPerSec = v0; //частота оцифровки + pcmWaveFormat.wf.nBlockAlign = channels * bitsPerSample / 8; //количество данных в блоке pcmWaveFormat.wBitsPerSample = bitsPerSample; - pcmWaveFormat.wf.nAvgBytesPerSec = v0 * channels * bitsPerSample / 8; + pcmWaveFormat.wf.nAvgBytesPerSec = pcmWaveFormat.wf.nSamplesPerSec * pcmWaveFormat.wf.nBlockAlign; if ( !AIL_waveOutOpen(&hDrv, 0, -1, &pcmWaveFormat.wf) ) { strcpy(pAudioPlayer->pDeviceNames[v1 / 8], "Device: "); @@ -2316,7 +2316,7 @@ HKEY hKey; // [sp+10h] [bp-4h]@1 hKey = 0; cbData = 4; - if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Aureal\\A3D", 0, 0x2001Fu, &hKey)) + if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Aureal\\A3D", 0, 0x2001F, &hKey)) { int Aureal3D_SplashAudio = 0; if (query)