Example #1
0
static void driver_tests(void)
{
    MMRESULT rc;
    DWORD dwACMVersion = acmGetVersion();

    if (winetest_interactive) {
        trace("ACM version = %u.%02u build %u%s\n",
              HIWORD(dwACMVersion) >> 8,
              HIWORD(dwACMVersion) & 0xff,
              LOWORD(dwACMVersion),
              LOWORD(dwACMVersion)  ==  0 ? " (Retail)" : "");
    }

    check_count(ACM_METRIC_COUNT_CODECS);
    check_count(ACM_METRIC_COUNT_CONVERTERS);
    check_count(ACM_METRIC_COUNT_DISABLED);
    check_count(ACM_METRIC_COUNT_DRIVERS);
    check_count(ACM_METRIC_COUNT_FILTERS);
    check_count(ACM_METRIC_COUNT_HARDWARE);
    check_count(ACM_METRIC_COUNT_LOCAL_CODECS);
    check_count(ACM_METRIC_COUNT_LOCAL_CONVERTERS);
    check_count(ACM_METRIC_COUNT_LOCAL_DISABLED);
    check_count(ACM_METRIC_COUNT_LOCAL_DRIVERS);
    check_count(ACM_METRIC_COUNT_LOCAL_FILTERS);

    if (winetest_interactive)
        trace("enabled drivers:\n");

    rc = acmDriverEnum(DriverEnumProc, 0, 0);
    ok(rc == MMSYSERR_NOERROR,
       "acmDriverEnum() failed, rc=%08x, should be 0x%08x\n",
       rc, MMSYSERR_NOERROR);
}
Example #2
0
int
acm_cv_startup (void)
{
     acmDriverEnum(getPCMConverter, 0L, 0L);
     if (hDrv) return TRUE;
     return FALSE;                /* Failed initialization, entry disabled in table */
}
Example #3
0
MMRESULT EnumerateACMDrivers() {
    AcmDriverList list;

    MMRESULT mmr = acmDriverEnum(
        myAcmDriverEnumCallback,
        reinterpret_cast<DWORD_PTR>(&list), // app-specific pointer
        ACM_DRIVERENUMF_DISABLED // include disabled drivers
    );

    if (MMSYSERR_NOERROR != mmr) {
        ERR(L"acmDriverEnum failed: mmr = 0x%08x", mmr);
        return mmr;
    }
    
    LOG(L"ACM Drivers found: %u", list.nCount);
    for (UINT32 i = 0; i < list.nCount; i++) {
        ACMDRIVERDETAILS details = {0};
        details.cbStruct = sizeof(details);
        
        mmr = acmDriverDetails(list.pDrivers[i].id, &details, 0);
        if (MMSYSERR_NOERROR != mmr) {
            ERR(L"acmDriverDetails failed: mmr = 0x%08x", mmr);
            return mmr;
        }
    
        if (list.pDrivers[i].fdwSupport != details.fdwSupport) {
            ERR(
                L"Different fdwSupport values from "
                L"acmDriverEnum Callback (0x%08x) and acmDriverDetails (0x%08x)",
                list.pDrivers[i].fdwSupport,
                details.fdwSupport
            );
        }
        
        LogDetails(details);
        
        LOG(L""); // blank line
    }
    
    return MMSYSERR_NOERROR;
}
int
ph_media_init()
{
  static int first_time = 1;

#if USE_CODECS
  ph_media_codecs_init();
#endif /* !USE_CODECS */

  if (!first_time)
    return 0;

  first_time = 0;
  ortp_init();
  rtp_profile_set_payload(&av_profile, PH_MEDIA_DTMF_PAYLOAD, &telephone_event);
  rtp_profile_set_payload(&av_profile, PH_MEDIA_ILBC_PAYLOAD, &ilbc);
  ortp_scheduler_init();
  ortp_set_debug_file("oRTP",NULL);
  tg_init_sine_table();

  //  eXosip_sdp_negotiation_remove_audio_payloads();

#if 0
  g_g723Drivers = 0;
  g_gsmDrivers  = 0;
  acmDriverEnum( acmDriverEnumCallback, 0, ACM_DRIVERENUMF_DISABLED );


  if(g_g723Drivers == 0)
  {
  }
/* !    fprintf(stderr, "No G723 decoders found!\n" ); */
  else
  {
#if 0
	  eXosip_sdp_negotiation_add_codec(osip_strdup("4"),
				   NULL,
				   osip_strdup("RTP/AVP"),
				   NULL, NULL, NULL,
				   NULL,NULL,
				   osip_strdup("4 G723/8000"));
#endif
  }

  if(g_gsmDrivers == 0)
  {
 /* !   fprintf(stderr, "No GSM decoders found!\n" ); */
  }
  else
  {
	  eXosip_sdp_negotiation_add_codec(osip_strdup("3"),
				   NULL,
				   osip_strdup("RTP/AVP"),
				   NULL, NULL, NULL,
				   NULL,NULL,
				   osip_strdup("3 GSM/8000"));
  }

  /* add A-Law & Mu-Law */
  eXosip_sdp_negotiation_add_codec(osip_strdup("0"),
				   NULL,
				   osip_strdup("RTP/AVP"),
				   NULL, NULL, NULL,
				   NULL,NULL,
				   osip_strdup("0 PCMU/8000"));

  eXosip_sdp_negotiation_add_codec(osip_strdup("8"),
				   NULL,
				   osip_strdup("RTP/AVP"),
				   NULL, NULL, NULL,
				   NULL,NULL,
				   osip_strdup("8 PCMA/8000"));
#endif

  return 0;

}