How to get Complete name of Audio devices

BN
Biswaranjan Nayak
Mon, Oct 8, 2018 6:41 AM

Dear Team,

While trying to get Audio devices name, library shows the name as incomplete
manner.

How to get the complete name of Audio devices ?

pjmedia_aud_dev_index dev_idx;

   pj_status_t status;

   int dev_count = pjmedia_aud_dev_count();

   printf("Got %d audio devices\n", dev_count);

   for (dev_idx = 0; dev_idx<dev_count; ++dev_idx) {

          pjmedia_aud_dev_info info;

          status = pjmedia_aud_dev_get_info(dev_idx, &info);

          printf("%d. %s (in=%d, out=%d)\n",

                 dev_idx, info.name,

                 info.input_count, info.output_count);

   }

Result :

Got 4 audio devices

  1. Wave mapper (in=2, out=2)

  2. Microphone Array (Realtek High  (in=2, out=0)

  3. Stereo Mix (Realtek High Defini (in=2, out=0)

  4. Speaker/Headphone (Realtek High (in=0, out=2)

Marked result must be the full name (i.e. Microphone Array (Realtek High
Definition Audio))

I found length for name is already specified to maximum (i.e. 128)

  • This setting controls the buffer length of audio device name.

  • Default: 128 for Windows platforms, 64 for others

*/

#ifndef PJMEDIA_AUD_DEV_INFO_NAME_LEN

if (defined(PJ_WIN32) && PJ_WIN32!=0) || \

   (defined(PJ_WIN64) && PJ_WIN64!=0)

define PJMEDIA_AUD_DEV_INFO_NAME_LEN 128

else

define PJMEDIA_AUD_DEV_INFO_NAME_LEN 64

endif

#endif

I've modified and checked, still no result. Please suggest.

Thanks & Regards

Biswaranjan Nayak

Dear Team, While trying to get Audio devices name, library shows the name as incomplete manner. How to get the complete name of Audio devices ? pjmedia_aud_dev_index dev_idx; pj_status_t status; int dev_count = pjmedia_aud_dev_count(); printf("Got %d audio devices\n", dev_count); for (dev_idx = 0; dev_idx<dev_count; ++dev_idx) { pjmedia_aud_dev_info info; status = pjmedia_aud_dev_get_info(dev_idx, &info); printf("%d. %s (in=%d, out=%d)\n", dev_idx, info.name, info.input_count, info.output_count); } Result : Got 4 audio devices 0. Wave mapper (in=2, out=2) 1. Microphone Array (Realtek High (in=2, out=0) 2. Stereo Mix (Realtek High Defini (in=2, out=0) 3. Speaker/Headphone (Realtek High (in=0, out=2) Marked result must be the full name (i.e. Microphone Array (Realtek High Definition Audio)) I found length for name is already specified to maximum (i.e. 128) * This setting controls the buffer length of audio device name. * * Default: 128 for Windows platforms, 64 for others */ #ifndef PJMEDIA_AUD_DEV_INFO_NAME_LEN # if (defined(PJ_WIN32) && PJ_WIN32!=0) || \ (defined(PJ_WIN64) && PJ_WIN64!=0) # define PJMEDIA_AUD_DEV_INFO_NAME_LEN 128 # else # define PJMEDIA_AUD_DEV_INFO_NAME_LEN 64 # endif #endif I've modified and checked, still no result. Please suggest. Thanks & Regards Biswaranjan Nayak