Mercurial > mm7
changeset 2479:908baf8e7d23
WAVE_FORMAT
author | Ritor1 |
---|---|
date | Fri, 22 Aug 2014 11:06:51 +0600 |
parents | acac52e9e36a |
children | 24fd08aef81e |
files | AudioPlayer.cpp |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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)