Running Audio3 on a Nokia 6600 phone
------------------------------------
The audio3 example is hardwired to play a "testing123.raw" file, which is a PCM16
file. The file is assumed to reside on the C: default drive.
The Nokia 6600 phone is not capable of playing PCM16 wave files from the flash drive
(C:) so, in order to run the application on this phone, you will need to make the
following change:
Modify the hardwired file name, in audio3eng.cpp, from "testing123.raw" to
"e:\\testing123.raw".
When installing the application on the Nokia 6600, make sure that you install it to
the "E [Memory card]" drive.
Changing how errors are treated
-------------------------------
The audio3 example is written so that it Panics if playing the file terminates for
any reason other than the user selecting "Stop", including the data stream underflowing.
You may consider this to be rather harsh, and may wish to modify the behaviour by
changing two functions in the way described below.
In the function:
void CSynchronousExampleStream::MaoscPlayComplete(TInt aError)
{
if (aError==KErrNone || aError==KErrCancel)//user selected "Stop"
{
iEngine->SetState(CAudio3Engine::EReadySynchronous);
PlayEnded(aError);
}
else
{
User::Invariant();
}
}
you could add a check for aError==KErrUnderflow to the 'if' statement. Alternatively,
and arguably preferably, you could replace the function with the simpler:
void CSynchronousExampleStream::MaoscPlayComplete(TInt aError)
{
iEngine->SetState(CAudio3Engine::EReadySynchronous);
PlayEnded(aError);
}
The stream will automatically re-initialise itself if the user selects Play() again.
Whichever option you choose, you should also make a corresponding change to the
function CAsynchronousExampleStream::MaoscPlayComplete(TInt aError).
Preventing frames from being dropped
------------------------------------
When playing a file in the asynchronous option, audio3 drops frames when there are
no free buffers to receive the incoming data. This is deliberate, illustrating the
behaviour that would be expected in a real application, but significantly degrades
the sound quality.
You can change this behaviour by deleting the two lines, as indicated below, in the
asynchronous stream;s RunL() function, in audio3eng.cpp.
void CAsynchronousExampleStream::RunL()
{
switch (iState)
{
case ETimer:
//A buffer is available to read from the source
if (iBufList[iEnd].Length()==0)
{
iFile.Read(iBufList[iEnd],iStatus);
iState=EReading;
SetActive();
break;
}
else
{//... but ignore it because there are no buffers free
TInt pos=KBufferSize; // Delete these two lines to
iFile.Seek(ESeekCurrent, pos); // stop dropping frames
RandomDelay();
break;
}
...
}
With this modification, the engine will wait indefinitely for a free buffer before
continuing.
没有合适的资源?快使用搜索试试~ 我知道了~
SymbianOSC++.zip_Symbian OS_symbian_symbian 源码
共452个文件
cpp:133个
h:112个
bmp:36个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 156 浏览量
2022-09-20
15:03:16
上传
评论
收藏 2.68MB ZIP 举报
温馨提示
Symbian OS C++手机开发源码
资源推荐
资源详情
资源评论
收起资源包目录
SymbianOSC++.zip_Symbian OS_symbian_symbian 源码 (452个子文件)
navixmask.bmp 6KB
navix.bmp 6KB
naviomask.bmp 6KB
navio.bmp 6KB
context_pane_icon.bmp 3KB
list_icon.bmp 2KB
oxs_iconm.bmp 2KB
oxs_icon.bmp 2KB
oxl_icon.bmp 2KB
oxl_iconm.bmp 2KB
oxl_iconm.bmp 2KB
large_icon_mask.bmp 2KB
oxl_icon.bmp 2KB
large_icon.bmp 2KB
large_icon.bmp 2KB
large_icon_mask.bmp 2KB
oxs_iconm.bmp 1KB
oxs_icon.bmp 1KB
small_icon.bmp 1KB
oxs_iconm.bmp 1KB
oxs_icon.bmp 1KB
small_icon_mask.bmp 1KB
small_icon_mask.bmp 1KB
small_icon.bmp 1KB
oxicon44.bmp 1KB
naviomask.bmp 670B
navix.bmp 670B
navio.bmp 670B
navixmask.bmp 670B
naviomask.bmp 670B
navix.bmp 670B
navixmask.bmp 670B
navio.bmp 670B
oxicon44m.bmp 414B
context_pane_icon_mask.bmp 414B
list_icon_mask.bmp 294B
oandxappview.cpp 10KB
t_viewSort.cpp 10KB
audio3eng.cpp 10KB
audio4engine.cpp 9KB
audio2engine.cpp 9KB
audio3engine.cpp 9KB
oandxappui.cpp 9KB
ViewExView.cpp 8KB
oandxappview.cpp 8KB
oandxappview.cpp 8KB
ViewExView.cpp 8KB
ViewExView.cpp 8KB
audio2eng.cpp 8KB
audio3eng.cpp 8KB
oandxappui.cpp 7KB
oandxappui.cpp 7KB
audio2eng.cpp 7KB
audio2ui.cpp 5KB
audio2ui.cpp 5KB
cleanup.cpp 5KB
cleanup.cpp 5KB
cleanup.cpp 5KB
ViewExAppUi.cpp 3KB
ViewExAppUi.cpp 3KB
ViewExAppUi.cpp 3KB
conslauncherappui.cpp 2KB
audio1eng.cpp 2KB
audio3ui.cpp 2KB
conslauncherappview.cpp 2KB
conslauncherappview.cpp 2KB
conslauncherappview.cpp 2KB
audio4eng.cpp 2KB
audio3ui.cpp 2KB
audio1eng.cpp 2KB
conslauncherappui.cpp 2KB
conslauncherappui.cpp 2KB
cactivehelloappui.cpp 2KB
cactivehelloappui.cpp 2KB
audio4eng.cpp 2KB
ViewExApp.cpp 2KB
ViewExApp.cpp 2KB
ViewExApp.cpp 2KB
audio1ui.cpp 2KB
audio4ui.cpp 2KB
audio2view.cpp 2KB
audio1view.cpp 2KB
audio3view.cpp 2KB
audio4view.cpp 2KB
audio4view.cpp 2KB
audio2view.cpp 2KB
audio1view.cpp 2KB
audio3view.cpp 2KB
audio1ui.cpp 2KB
cflashinghello.cpp 2KB
cflashinghello.cpp 2KB
cflashinghello.cpp 2KB
oandxdocument.cpp 1KB
oandxdocument.cpp 1KB
oandxdocument.cpp 1KB
audio4ui.cpp 1KB
cactivehelloappui.cpp 1KB
ViewExDocument.cpp 1KB
cactivehelloappview.cpp 1KB
cactivehelloappview.cpp 1KB
共 452 条
- 1
- 2
- 3
- 4
- 5
资源评论
我虽横行却不霸道
- 粉丝: 72
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功