diff --git a/pjmedia/include/pjmedia-audiodev/config.h b/pjmedia/include/pjmedia-audiodev/config.h index 1844a9c71..82fb2e6d9 100644 --- a/pjmedia/include/pjmedia-audiodev/config.h +++ b/pjmedia/include/pjmedia-audiodev/config.h @@ -105,12 +105,13 @@ contains many enhancements: - Built-in features: \n - The device capabilities framework enables applications to use audio features - built-in in the device, such as: + The device capabilities framework enables applications to use and control + audio features built-in in the device, such as: - echo cancellation, - built-in codecs, - - audio routing, and - - volume control. + - audio routing (e.g. to earpiece or loudspeaker), + - volume control, + - etc. - Codec support: \n @@ -124,7 +125,206 @@ contains many enhancements: The new API supports multiple audio backends (called factories or drivers in the code) to be active simultaneously, and audio backends may be added or removed during run-time. - */ + + +@section using Overview on using the API + +@subsection getting_started Getting started + + -# Configure the application's project settings.\n + Add the following + include: + \code + #include \endcode\n + And add pjmedia-audiodev library to your application link + specifications.\n + -# Compile time settings.\n + Use the compile time settings to enable or + disable specific audio drivers. For more information, please see + \ref s1_audio_device_config. + -# API initialization and cleaning up.\n + Before anything else, application must initialize the API by calling: + \code + pjmedia_aud_subsys_init(pf);\endcode\n + And add this in the application cleanup sequence + \code + pjmedia_aud_subsys_shutdown();\endcode + +@subsection devices Working with devices + + -# The following code prints the list of audio devices detected + in the system. + \code + int dev_count; + pjmedia_aud_dev_index dev_idx; + pj_status_t status; + + dev_count = pjmedia_aud_dev_count(); + printf("Got %d audio devices\n", dev_count); + + for (dev_idx=0; dev_idx /* This sound API is deprecated. Please see: http://trac.pjsip.org/repos/wiki/Audio_Dev_API -#include */ +#if PJMEDIA_AUDIO_API != PJMEDIA_AUDIO_API_NEW_ONLY +#include +#endif #include #include #include diff --git a/pjmedia/include/pjmedia_audiodev.h b/pjmedia/include/pjmedia_audiodev.h new file mode 100644 index 000000000..e011d1b9c --- /dev/null +++ b/pjmedia/include/pjmedia_audiodev.h @@ -0,0 +1,33 @@ +/* $Id$ */ +/* + * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) + * Copyright (C) 2003-2008 Benny Prijono + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __PJMEDIA_AUDIODEV_H__ +#define __PJMEDIA_AUDIODEV_H__ + +/** + * @file pjmedia_audiodev.h + * @brief PJMEDIA main header file. + */ + +#include +#include +#include + +#endif /* __PJMEDIA_AUDIODEV_H__ */ +