PDA

View Full Version : Why doesn't this mute the incomming call ring?


vpreHoose
31-03-2003, 07:34 PM
After looking around I thought that this would stop the incomming call ring, but it doesn't.

Any suggestions please?

#include "StdAfx.h"
#include <Mmsystem.h>

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
HWAVEOUT hwo;
MMRESULT result = 0;

static WAVEFORMATEX wmTemp;
wmTemp.wFormatTag = WAVE_FORMAT_PCM;
wmTemp.nChannels = 1;
wmTemp.nSamplesPerSec = 8000 * 1000;
wmTemp.wBitsPerSample = 8;
wmTemp.nBlockAlign = wmTemp.nChannels * wmTemp.wBitsPerSample / 8;
wmTemp.nAvgBytesPerSec = wmTemp.nSamplesPerSec * wmTemp.nBlockAlign;
wmTemp.cbSize = 0;

result = waveOutOpen(&hwo, (UINT) WAVE_MAPPER, &wmTemp, 0, 0, CALLBACK_NULL);
result = waveOutSetVolume(hwo, 0);

waveOutClose(hwo);

return 0;
}

vpreHoose
03-04-2003, 09:40 AM
It seems that the Phone application doesn't use wave audio to play the file (strange as the ring tone is a wav file), or it is played exclusivly, Synchronously.

Any ideas?

mmalek
28-09-2005, 10:50 AM
All you need is to change the value of the registry value:

[HKCU\ControlPanel\SoundCategories\Ring\InitVol]
0=Mute 5=MAx ring volume
Enjoy :twisted: