admin管理员组

文章数量:1605636

说到移植madplay 网上都是下载这几个文件libid3tag-0.15.1b.tar.gz, libmad-0.15.1b.tar.gz,  zlib-1.1.4.tar.gz。

但是在imx6ul移植不是很顺利,编译报错很多,最终是下载了较新版本的zlib-1.2.8.tar.gz一切都很顺畅。

过程如下:

下载:zlib-1.2.8.tar.gz  、 libid3tag-0.15.1b.tar.gz 、 libmad-0.15.1b.tar.gz 、 madplay-0.15.2b.tar.gz

解压代码:tar xvf *.tar.gz

(1) 进入 zlib-1.2.8
./configure --prefix=/opt/madplay/_install
注意_install后面不要有/

make && make install

(2)进入 libid3tag-0.15.1b 
./configure --host=arm-poky-linux-gnueabi --enable-static --disable-shared --disable-debugging --prefix=/opt/madplay/_install CPPFLAGS=-I/opt/madplay/_install/include LDFLAGS=-L/opt/madplay/_install/lib

make && make install


(3)进入 libmad-0.15.1b
./configure --host=arm-poky-linux-gnueabi --enable-static --disable-shared --disable-debugging --prefix=/opt/madplay/_install CPPFLAGS=-I/opt/madplay/_install/include LDFLAGS=-L/opt/madplay/_install/lib

修改Makefile文件:去掉-fforce-mem
make && make install

(4)进入 madplay-0.15.2b
./configure --host=arm-poky-linux-gnueabi --enable-static --disable-shared --disable-debugging --prefix=/opt/madplay/_install CPPFLAGS=-I/opt/madplay/_install/include LDFLAGS=-L/opt/madplay/_install/lib

make

(5) 拷贝madplay至目标板 /usr/bin

audio: /dev/dsp: No such file or directory madplay
输入播放命令:
madplay -o wav:- .mp3 | aplay

 

 

2020.10.28   更新: 用 buildroot添加madplay工具,可以节省上面移植曲折过程。 

 

本文标签: 播放器imx6ulmadplay