Hi! I have some problem with DirectPlayVoice.
Code:
FillChar(dvDeviceConfig, sizeof(dvSoundDeviceConfig), 0);
  dvDeviceConfig.dwSize := sizeof(DVSOUNDDEVICECONFIG);
    dvDeviceConfig.dwFlags := DVSOUNDCONFIG_AUTOSELECT;
    dvDeviceConfig.guidPlaybackDevice := DSDEVID_DefaultVoicePlayback;

    //dvDeviceConfig.lpdsPlaybackDevice := id ;

    dvDeviceConfig.guidCaptureDevice := DSDEVID_DefaultVoiceCapture;
    //dvDeviceConfig.lpdsCaptureDevice := idc;
    dvDeviceConfig.hwndAppWindow := MainForm.Handle;
    //dvDeviceConfig.lpdsMainBuffer := buf;
    dvDeviceConfig.dwMainBufferFlags := 0;
    dvDeviceConfig.dwMainBufferPriority := 0;


    Fillchar(ClientConfig, sizeof(DVClientConfig), 0);
    ClientConfig.dwFlags := DVCLIENTCONFIG_AUTOVOICEACTIVATED or DVCLIENTCONFIG_AUTORECORDVOLUME;
    ClientConfig.lRecordVolume := DVRECORDVOLUME_LAST;
    ClientConfig.lPlaybackVolume := DVPLAYBACKVOLUME_DEFAULT;
    ClientConfig.dwThreshold := DVTHRESHOLD_UNUSED;
    ClientConfig.dwBufferQuality := DVBUFFERQUALITY_DEFAULT;
    ClientConfig.dwBufferAggressiveness := DVBUFFERAGGRESSIVENESS_DEFAULT;
    ClientConfig.dwNotifyPeriod := 0;


    hr := g_pVoiceClient.Connect(dvDeviceConfig, ClientConfig, DVFLAGS_SYNC );
    if failed(hr) then
    Begin
      showerror(hr, 'clientvoice');
      result := e_fail;
      Exit;
    End;
On g_pVoiceClient.Connect error: one or more of the parametrs passed to the mehtod are invalid. Why? May be problem in commented strings (sorry for my english). At the ms directplay help (for c++) told that it is optional parametrs. I have always created idirectsound and idirectsoundcapture objects and passed it to the mehod but not successfull. I cant find solution of this problem. Please help! [/code]