Wav player in Symbian APS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Did anybody try to play wav file with pjmedia in APS direct. I am not usin
pjsua library. I tried to play all kind of files which are included
with pjsip source. But no luck. I get no sound. The sound device is working
fine with onmedia update callback with ext format.

These are the files are tried.
input.11.wav
input.16.wav
input.2.16.wav
input.2.8.wav
input.22.wav
input.32.wav
input.44.wav
input.48.wav
input.8.wav



My code.


pj_status_t status;

TFileName path;

TFileName pathWithoutDrive;

CEikonEnv::*Static*()->*FsSession*().*PrivatePath*( pathWithoutDrive );

RProcess process;

path.*Copy*( process.*FileName*().*Left*(2) );

path.*Append*( pathWithoutDrive );

path.*Append*(*_L*("ring.wav"));

path.*ZeroTerminate*();

TBuf8<128> filename;

filename.*Copy*(path);

filename.*ZeroTerminate*();

status = pjmedia_wav_player_port_create(g_inv->pool,(*const* *char*
*)filename.*Ptr*(),0,0,0,&ring_port);

 // *int a = ring_port->info.clock_rate;
*

// *int b = ring_port->info.channel_count;
*

// *int c = ring_port->info.samples_per_frame;
*

// *int d = ring_port->info.bits_per_sample;
*

pjmedia_snd_port_param param;

pjmedia_aud_dev_index dev_idx;

  dev_idx = *PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV*;

status = pjmedia_aud_dev_default_param(dev_idx, &param.base);

param.base.dir = *PJMEDIA_DIR_PLAYBACK*;

//param.base.rec_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV;

param.base.play_id = *PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV*;

param.base.clock_rate = ring_port->info.clock_rate;

param.base.channel_count = ring_port->info.channel_count;

param.base.samples_per_frame = ring_port->info.samples_per_frame;

param.base.bits_per_sample = ring_port->info.bits_per_sample;

//param.base.ext_fmt.id = PJMEDIA_FORMAT_ULAW;

param.base.flags |= *PJMEDIA_AUD_DEV_CAP_EXT_FORMAT*;

status = pjmedia_snd_port_create2(g_inv->pool,&param,&ring_snd_dev);

//status = pjmedia_snd_port_create_player(g_inv->pool, -1,
ring_port->info.clock_rate,ring_port->info.channel_count,
ring_port->info.samples_per_frame, ring_port->info.bits_per_sample,0,
&ring_snd_dev) ;

pj_thread_sleep(200);

status = pjmedia_snd_port_connect( ring_snd_dev, ring_port);





Anything missing here? If you have any wav file which did played in symbian
aps, please give that to me for testing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111029/e44dc7b0/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux