Fixed MFC for my previous commit.
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@829 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
437be084a9
commit
9645dabc61
|
@ -786,7 +786,7 @@ void MainWnd::OnAudioCoreSettings()
|
||||||
dlg.m_declicking = gbSoundGetDeclicking();
|
dlg.m_declicking = gbSoundGetDeclicking();
|
||||||
dlg.m_sound_interpolation = soundInterpolation;
|
dlg.m_sound_interpolation = soundInterpolation;
|
||||||
dlg.m_sound_filtering = soundFiltering;
|
dlg.m_sound_filtering = soundFiltering;
|
||||||
dlg.m_sample_rate = 44100 / soundQuality;
|
dlg.m_sample_rate = soundGetSampleRate();
|
||||||
|
|
||||||
if( IDOK == dlg.DoModal() ) {
|
if( IDOK == dlg.DoModal() ) {
|
||||||
gb_effects_config_t _new;
|
gb_effects_config_t _new;
|
||||||
|
@ -807,9 +807,9 @@ void MainWnd::OnAudioCoreSettings()
|
||||||
soundFiltering = dlg.m_sound_filtering;
|
soundFiltering = dlg.m_sound_filtering;
|
||||||
|
|
||||||
if( theApp.cartridgeType == IMAGE_GBA ) {
|
if( theApp.cartridgeType == IMAGE_GBA ) {
|
||||||
soundSetQuality( 44100 / dlg.m_sample_rate );
|
soundSetSampleRate( dlg.m_sample_rate );
|
||||||
} else if( theApp.cartridgeType == IMAGE_GB ) {
|
} else if( theApp.cartridgeType == IMAGE_GB ) {
|
||||||
gbSoundSetQuality( 44100 / dlg.m_sample_rate );
|
gbSoundSetSampleRate( dlg.m_sample_rate );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -397,7 +397,7 @@ void MainWnd::OnToolsRecordStartavirecording()
|
||||||
// add audio stream
|
// add audio stream
|
||||||
ret = theApp.aviRecorder->CreateAudioStream(
|
ret = theApp.aviRecorder->CreateAudioStream(
|
||||||
2,
|
2,
|
||||||
44100 / soundGetQuality(),
|
soundGetSampleRate(),
|
||||||
16,
|
16,
|
||||||
this->GetSafeHwnd()
|
this->GetSafeHwnd()
|
||||||
);
|
);
|
||||||
|
|
|
@ -1290,7 +1290,7 @@ void systemOnWriteDataToSoundBuffer(const u16 * finalWave, int length)
|
||||||
format.cbSize = 0;
|
format.cbSize = 0;
|
||||||
format.wFormatTag = WAVE_FORMAT_PCM;
|
format.wFormatTag = WAVE_FORMAT_PCM;
|
||||||
format.nChannels = 2;
|
format.nChannels = 2;
|
||||||
format.nSamplesPerSec = 44100 / soundQuality;
|
format.nSamplesPerSec = soundGetSampleRate();
|
||||||
format.wBitsPerSample = 16;
|
format.wBitsPerSample = 16;
|
||||||
format.nBlockAlign = format.nChannels * ( format.wBitsPerSample >> 3 );
|
format.nBlockAlign = format.nChannels * ( format.wBitsPerSample >> 3 );
|
||||||
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
||||||
|
@ -1524,7 +1524,8 @@ void VBA::loadSettings()
|
||||||
int res = regQueryDwordValue("soundEnable", 0x30f);
|
int res = regQueryDwordValue("soundEnable", 0x30f);
|
||||||
soundSetEnable(res);
|
soundSetEnable(res);
|
||||||
|
|
||||||
soundQuality = regQueryDwordValue("soundQuality", 1);
|
long soundQuality = regQueryDwordValue("soundQuality", 1);
|
||||||
|
soundSetSampleRate(44100 / soundQuality);
|
||||||
|
|
||||||
soundSetVolume( (float)(regQueryDwordValue("soundVolume", 100)) / 100.0f );
|
soundSetVolume( (float)(regQueryDwordValue("soundVolume", 100)) / 100.0f );
|
||||||
|
|
||||||
|
@ -2518,7 +2519,7 @@ void VBA::saveSettings()
|
||||||
|
|
||||||
regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
|
regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
|
||||||
|
|
||||||
regSetDwordValue("soundQuality", soundQuality);
|
regSetDwordValue("soundQuality", soundGetSampleRate() / 44100);
|
||||||
|
|
||||||
regSetDwordValue("soundVolume", (DWORD)(soundGetVolume() * 100.0f));
|
regSetDwordValue("soundVolume", (DWORD)(soundGetVolume() * 100.0f));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue