commit
adfe3db99a
|
@ -132,10 +132,16 @@ void DirectSoundDriver::SetFrequency(uint32_t Frequency)
|
||||||
|
|
||||||
void DirectSoundDriver::SetVolume(uint32_t Volume)
|
void DirectSoundDriver::SetVolume(uint32_t Volume)
|
||||||
{
|
{
|
||||||
/*DWORD dsVolume = ((DWORD)Volume * -25);
|
LPDIRECTSOUNDBUFFER & lpdsb = (LPDIRECTSOUNDBUFFER &)m_lpdsb;
|
||||||
if (Volume == 100) dsVolume = (DWORD)DSBVOLUME_MIN;
|
int32_t dsVolume = - 10 ^ ((100 - Volume) * 33);
|
||||||
if (Volume == 0) dsVolume = DSBVOLUME_MAX;
|
if (Volume == 0)
|
||||||
if (lpdsb != NULL) lpdsb->SetVolume(dsVolume);*/
|
{
|
||||||
|
dsVolume = DSBVOLUME_MIN;
|
||||||
|
}
|
||||||
|
if (lpdsb != NULL)
|
||||||
|
{
|
||||||
|
lpdsb->SetVolume(dsVolume);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectSoundDriver::SetSegmentSize(uint32_t length, uint32_t SampleRate)
|
void DirectSoundDriver::SetSegmentSize(uint32_t length, uint32_t SampleRate)
|
||||||
|
@ -278,4 +284,4 @@ void DirectSoundDriver::AudioThreadProc()
|
||||||
lpdsbuf->Stop();
|
lpdsbuf->Stop();
|
||||||
}
|
}
|
||||||
WriteTrace(TraceAudioDriver, TraceDebug, "Audio Thread Terminated...");
|
WriteTrace(TraceAudioDriver, TraceDebug, "Audio Thread Terminated...");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue