diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-11-19 04:03:00 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-11-19 04:03:00 +0000 |
commit | 0eac1761fb3d3fb17799f1e8363f25b495094d07 (patch) | |
tree | 21a8be90fc7618a4d1f298e3880592637eff3d71 /pjmedia | |
parent | 2b2aaa7bba77b4615e58a3b2b25dab404064e366 (diff) |
Re #1882 (misc): Configurable audio device name length
Thanks to Wolfgang Wallhäuser for the original patch.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5201 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/include/pjmedia-audiodev/audiodev.h | 2 | ||||
-rw-r--r-- | pjmedia/include/pjmedia-audiodev/config.h | 14 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/sound.h | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/pjmedia/include/pjmedia-audiodev/audiodev.h b/pjmedia/include/pjmedia-audiodev/audiodev.h index a314f101..b5e144f2 100644 --- a/pjmedia/include/pjmedia-audiodev/audiodev.h +++ b/pjmedia/include/pjmedia-audiodev/audiodev.h @@ -223,7 +223,7 @@ typedef struct pjmedia_aud_dev_info /** * The device name */ - char name[64]; + char name[PJMEDIA_AUD_DEV_INFO_NAME_LEN]; /** * Maximum number of input channels supported by this device. If the diff --git a/pjmedia/include/pjmedia-audiodev/config.h b/pjmedia/include/pjmedia-audiodev/config.h index b05f822d..b55aed44 100644 --- a/pjmedia/include/pjmedia-audiodev/config.h +++ b/pjmedia/include/pjmedia-audiodev/config.h @@ -43,6 +43,20 @@ PJ_BEGIN_DECL */ /** + * 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 + +/** * This setting controls whether PortAudio support should be included. * * By default it is enabled except on Windows platforms (including diff --git a/pjmedia/include/pjmedia/sound.h b/pjmedia/include/pjmedia/sound.h index c1eb9211..3bedb08f 100644 --- a/pjmedia/include/pjmedia/sound.h +++ b/pjmedia/include/pjmedia/sound.h @@ -75,7 +75,8 @@ typedef struct pjmedia_snd_stream pjmedia_snd_stream; */ typedef struct pjmedia_snd_dev_info { - char name[64]; /**< Device name. */ + char name[PJMEDIA_AUD_DEV_INFO_NAME_LEN]; + /**< Device name. */ unsigned input_count; /**< Max number of input channels. */ unsigned output_count; /**< Max number of output channels. */ unsigned default_samples_per_sec;/**< Default sampling rate. */ |