Opened 9 years ago
Closed 9 years ago
#1871 closed defect (fixed)
Missing audio index normalization in audio device open functions
Reported by: | nanang | Owned by: | nanang |
---|---|---|---|
Priority: | normal | Milestone: | release-2.4.5 |
Component: | pjmedia | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description
Audio device open APIs, as described in the specifications, treat any negative device ID value indifferently, i.e: as default or first available device. However, some new audio device APIs differentiate -1 and -2 as PJMEDIA_AUD_DEFAULT_CAPTURE_DEV and PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV, such as pjmedia_aud_dev_default_param().
Unfortunately some device open API implementations are currently not normalizing the negative audio index before calling pjmedia_aud_dev_default_param(). So for example, on a system without input device, calling pjmedia_snd_port_create_player() with device index param set to -1 (=PJMEDIA_AUD_DEFAULT_CAPTURE_DEV) will return error PJMEDIA_EAUD_NODEFDEV.
Thanks Daljeet Singh for the report.
Change History (1)
comment:1 Changed 9 years ago by nanang
- Resolution set to fixed
- Status changed from new to closed
In 5140: