Changeset 2475


Ignore:
Timestamp:
Feb 23, 2009 1:53:30 PM (10 years ago)
Author:
nanang
Message:
  • Updated Symbian bld.inf & MMP projects to use new audio framework.
  • Updated audiodev.c to accomodate Symbian audio devs (APS & standard multimedia framework).
  • Fixed compile warning & errors on Symbian.
Location:
pjproject/branches/projects/aps-direct
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/build.symbian/bld.inf

    r2438 r2475  
    2323libpassthroughcodec.mmp 
    2424 
    25 /* Sound device impl */ 
    26 symbian_audio.mmp 
     25/* Audio device. */ 
     26pjmedia_audiodev.mmp 
    2727 
    2828/* Applications */ 
  • pjproject/branches/projects/aps-direct/build.symbian/pjmedia_audiodev.mmp

    r2467 r2475  
    1212MACRO           PJ_SYMBIAN=1 
    1313 
     14SOURCE          audiodev.c 
    1415SOURCE          symb_aps_dev.cpp 
    1516SOURCE          symb_mda_dev.cpp 
  • pjproject/branches/projects/aps-direct/build.symbian/symbian_ua.mmp

    r2438 r2475  
    3636STATICLIBRARY           libsrtp.lib 
    3737STATICLIBRARY           libgsmcodec.lib libspeexcodec.lib libpassthroughcodec.lib 
    38 STATICLIBRARY           symbian_audio.lib 
     38STATICLIBRARY           pjmedia_audiodev.lib 
    3939 
    4040#if SND_USE_APS 
  • pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev_imp.h

    r2470 r2475  
    179179 
    180180 
    181 #endif __AUDIODEV_IMP_H__ 
     181#endif /* __AUDIODEV_IMP_H__ */ 
  • pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/config.h

    r2473 r2475  
    6060 
    6161/** 
     62 * This setting controls whether Symbian APS support should be included. 
     63 */ 
     64#ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_APS 
     65#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_APS       0 
     66#endif 
     67 
     68 
     69/** 
     70 * This setting controls whether Symbian audio (using built-in multimedia  
     71 * framework) support should be included. 
     72 */ 
     73#ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA 
     74#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA       0 
     75#endif 
     76 
     77/** 
    6278 * @} 
    6379 */ 
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/audiodev.c

    r2470 r2475  
    7272#endif 
    7373 
     74#if PJMEDIA_AUDIO_DEV_HAS_SYMB_APS 
     75pjmedia_aud_dev_factory* pjmedia_aps_factory(pj_pool_factory *pf); 
     76#endif 
     77 
     78#if PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA 
     79pjmedia_aud_dev_factory* pjmedia_symb_mda_factory(pj_pool_factory *pf); 
     80#endif 
    7481 
    7582#define MAX_DRIVERS     16 
     
    231238#if PJMEDIA_AUDIO_DEV_HAS_WMME 
    232239    aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_wmme_factory; 
     240#endif 
     241#if PJMEDIA_AUDIO_DEV_HAS_SYMB_APS 
     242    aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_aps_factory; 
     243#endif 
     244#if PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA 
     245    aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_symb_mda_factory; 
    233246#endif 
    234247 
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp

    r2468 r2475  
    2727#include <pj/string.h> 
    2828 
     29#if PJMEDIA_AUDIO_DEV_HAS_SYMB_APS 
     30 
    2931#include <e32msgqueue.h> 
    3032#include <sounddevice.h> 
     
    10901092 * Factory operations 
    10911093 */ 
     1094 
     1095/* 
     1096 * C compatible declaration of APS factory. 
     1097 */ 
     1098PJ_BEGIN_DECL 
     1099PJ_DECL(pjmedia_aud_dev_factory*) pjmedia_aps_factory(pj_pool_factory *pf); 
     1100PJ_END_DECL 
     1101 
    10921102/* 
    10931103 * Init APS audio driver. 
    10941104 */ 
    1095 pjmedia_aud_dev_factory* pjmedia_aps_factory(pj_pool_factory *pf) 
     1105PJ_DEF(pjmedia_aud_dev_factory*) pjmedia_aps_factory(pj_pool_factory *pf) 
    10961106{ 
    10971107    struct aps_factory *f; 
     
    15321542} 
    15331543 
     1544#endif // PJMEDIA_AUDIO_DEV_HAS_SYMB_APS 
     1545 
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp

    r2468 r2475  
    798798    af->dev_info.default_samples_per_sec = 8000; 
    799799    af->dev_info.caps = PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING | 
    800                         PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING | 
     800                        PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING; 
    801801    af->dev_info.input_count = 1; 
    802802    af->dev_info.output_count = 1; 
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/errno.c

    r2394 r2475  
    2121#include <pjmedia/types.h> 
    2222#include <pj/string.h> 
    23 #if PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_PORTAUDIO_SOUND 
     23#if defined(PJMEDIA_SOUND_IMPLEMENTATION) && \ 
     24    PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_PORTAUDIO_SOUND 
    2425#   include <portaudio.h> 
    2526#endif 
     
    180181 
    181182    /* See if the error comes from PortAudio. */ 
    182 #if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_PORTAUDIO_SOUND 
     183#if defined(PJMEDIA_SOUND_IMPLEMENTATION) && \ 
     184    PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_PORTAUDIO_SOUND 
    183185    if (statcode >= PJMEDIA_PORTAUDIO_ERRNO_START && 
    184186        statcode <= PJMEDIA_PORTAUDIO_ERRNO_END) 
  • pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/ua.cpp

    r2461 r2475  
    2020#include <pjsua-lib/pjsua.h> 
    2121#include <pjsua-lib/pjsua_internal.h> 
    22 #include <pjmedia/symbian_sound_aps.h> 
     22//#include <pjmedia/symbian_sound_aps.h> 
    2323#include "ua.h" 
    2424 
     
    523523    switch (kc) { 
    524524     
    525 #   if PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_SYMB_APS_SOUND 
     525#   if 0  && PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_SYMB_APS_SOUND 
    526526    case 't': 
    527527        do { 
    528             static pjmedia_snd_route route = PJMEDIA_SND_ROUTE_DEFAULT; 
     528            static pjmedia_snd_route route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT; 
    529529             
    530             if (route == PJMEDIA_SND_ROUTE_LOUDSPEAKER) 
    531                 route = PJMEDIA_SND_ROUTE_EARPIECE; 
     530            if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER) 
     531                route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE; 
    532532            else 
    533                 route = PJMEDIA_SND_ROUTE_LOUDSPEAKER; 
     533                route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 
    534534 
    535535            pjsua_set_snd_route(route); 
     
    908908    aConn.Close(); 
    909909    aSocketServer.Close(); 
    910          
     910     
    911911    return status; 
    912912} 
Note: See TracChangeset for help on using the changeset viewer.