Symbian Special Interest Group

Sig Is symbian special interest Group

« How to get the free space of every driveNow we can debug bluetooth app on S60 3rd and UIQ3 emulator »

UIQ3 audio streaming with code

For me, develop applications for Symbian was always like ideas->SDK helper->forums->R&D->forums->R&D->...->implementation. This time I thought the problem would be easier, but it did not.

I tried to port Nokia's audio streaming example to UIQ3. Since the code for S60 was already done and there's another output streaming example in sonyericsson website, it couldn't be easier, right? Well, we'll see.

When I copied the S60 code to UIQ it compiled as I expected, but it didn't work for me! I can not record any audio. Through a lot of searching I got the answer and listed below, hope can help you when you meet the same problem:

1. You have to set the bit rate to 12200 to get UIQ phones work when recording. Or else you will meet KErrArgument when recording. Refer to attached example code to know more. I think the reason is CMdaAudioInputStream class takes advantage of DevSound and the DevSound relies on hardware (DSP) codecs.

2. From reference #1, you can see on UIQ3 phones, Audio (CMdaAudioXxxx) APIs only support AMR-NB format audio recording. The original text is "The only format currently available for audio recording by third party applications is AMR-NB. Additional formats may be available in future versions."

3. When doing recording, make sure you give the inputstream big enough buffer, or else API will leave with KErrOverflow when recording the last frame.

4. MaiscRecordComplete() callback function may never be called. As the SDK helper, it says "A callback function that is called when the input stream is closed using CMdaAudioInputStream::Stop().", but it's not true. Most of the case, MaiscRecordComplete will not be called when I invoke CMdaAudioInputStream::Stop(). Actually, as far as I know, it is called when recorder met some errors.

5. Don't forget to add the AMR header to the file when you want to save recorded contents. Or it can't be played by any player.

I attached the example code because in developer.sonyericsson.com, there is only an example of outputstream while inputstream is actually more tricky to use.


Reference

1. UIQ 3 C++ Developers guidelines http://developer.sonyericsson.com/getDocument.do?docId=84685
2. MaiscRecordComplete() issue http://forum.newlc.com/index.php?topic=5205.0
3. bit rate issue http://developer.sonyericsson.com/thread.jspa?messageID=102522

Example Code

The code is tested in P990i(Organizer:R6D18) and M600i(Organizer:R1A52)

UIQAudioEngine.zip

This article is also published in www.NewLC.com
http://www.newlc.com/uiq3-audio-streaming-code

  • quote 1.三面翻
  • http://www.zz-hh.com/sanmianfan.htm
  • 换新面孔了,虽然有点陌生,但还是很喜欢的。。。
    [url=http://www.zz-hh.com/sanmianfan.htm]三面翻[/url]
    [url=http://www.kmtyn.com/solarpanel.htm]solar panel/solar panels[/url][url=http://www.kmtyn.com/solarpanels.htm]solar panel/solar panels[/url]
    [url=http://www.sdxtkj.com]打标机/激光打标机[/url]
  • 2008-11-11 14:42:09
  • quote 2.医药招商
  • http://www.yaozhaoshang.com.cn
  • 初次看您的页面,不错,支持下。。。
    [url=http://www.yaozhaoshang.com.cn/]医药招商网/医药招商/药品招商,药品代理,医药代理[/url]
    [url=http://www.solarnet.net.cn]太阳能热水器[/url]
  • 2008-11-18 14:59:08
  • quote 3.三面翻
  • http://www.zz-hh.com/sanmianfan.htm
  • 行文若流水,感觉很舒畅。。。
    [url=http://www.zz-hh.com/sanmianfan.htm]三面翻[/url],
    [url=http://www.kmtyn.com/solarpanel.htm]solar panel/solar panels[/url],[url=http://www.kmtyn.com/solarpanels.htm]solar panel/solar panels[/url],
    [url=http://www.sdxtkj.com]打标机/激光打标机[/url]
  • 2008-11-19 10:36:22
  • quote 4.上海Google推广
  • http://www.qigu.org.cn
  • <A href="http://www.qigu.org.cn/">上海Google推广</a>
    <A href="http://www.qigu.org.cn/">上海Google优化</a>
    <A href="http://www.qigu.org.cn/">上海网站推广</a>
    <A href="http://www.qigu.org.cn/">上海Google代理</a>
    <A href="http://www.qigu.org.cn/">上海Google排名</a>
  • 2008-12-25 13:17:12

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新留言

最近发表

Powered By Z-Blog 1.6 Final Build 60816

Copyright 2006-2007 SymbianSIG.com . All Rights Reserved.