Linux开发板怎么用madplay,为madplay这样编写应用程序 - 基于JZ2440(1)

准备工作一:

编译madplay

首先解压三个压缩文件

[root@localhost ~]# cd

/work/projects/sound/

[root@localhost sound]#

ls

libid3tag-0.15.1b.tar.gz

libmad-0.15.1b.tar.gz madplay-0.15.2b.tar.gz

[root@localhost sound]# tar

xzf

libid3tag-0.15.1b.tar.gz //从名字上看是个库

[root@localhost sound]# tar

xzf libmad-0.15.1b.tar.gz //这个也是库

[root@localhost sound]# tar

xzf

madplay-0.15.2b.tar.gz //这个是应用程序,它依赖这两个库

[root@localhost

sound]#

[root@localhost sound]# cd

libid3tag-0.15.1b

[root@localhost

libid3tag-0.15.1b]# ./configure--host=arm-linux

--prefix=/work/projects/sound/tmp

configure: WARNING: If you

wanted to set the --build type, don't use--host.

If a cross compiler isdetected then cross

compile mode will be used.

checking for a BSD-compatible

install... /usr/bin/install -c

checking whether build

environment is sane... yes

然后再

make

make install

再按照上面的方法进入libmad-0.15.1b文件夹编译

./configure --host=arm-linux

--prefix=/work/projects/sound/tmpLDFLAGS="-L/work/projects/sound/tmp/lib"

CFLAGS="-I/work/projects/sound/tmp/include"

注意:

-L/work…..

这个-L与/之间没有空格.

然后再

make

make install

把tmp/bin/* tmp/lib/*so*

-d把库文件复制到开发板lib文件夹,bin文件复制到开发板的bin文件夹

# madplay --tty-control

/mnt/mp3/beyond.mp3

MPEG Audio Decoder 0.15.2

(beta) - Copyright (C) 2000-2004 RobertLeslie et

al.

s3c2410-uda1341-superlp:

audio_set_dsp_speed:44100 prescaler:66

Artist:

Beyond£¨»Æ¼ò¾Ô£©

Album:òôàÖμîìÃMusicPalace

s3c2410-uda1341-superlp:

audio_set_dsp_speed:44100 prescaler:66

到这里时候测试下自己的开发板能否播放mp3音乐。

注意事项:确保自己的开发板已经有声卡了,想提高播放音乐的音量不能用madplay提供的方法(声音加大会破掉,而且音质会变得很差),如果你的开发板有QT界面直接调整音量滑块。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值