2204 views|10 replies

7

Posts

0

Resources
The OP
 

[RVB2601 Creative Application Development] Online MP3 Music Playback [Copy link]

 

Open the CDK integrated development environment in Windows, search for the online music player example webplayer in HOME, open it and compile and burn it to the development board

Note: Use the microUSB interface of JTAG (with built-in virtual serial port) for downloading, and the UART interface for serial communication!

Open the UART serial port in the serial port assistant and connect to wifi through the command line.

Note: There must be a carriage return after the command line. Some serial port assistants have automatic carriage return characters, while some do not. If there is no carriage return character, the command will be invalid.

ifconfig ap wifiname password

If the connection is successful, the following information will be printed:

[2022-03-18 16:49:57.49.187]: ifconfig ap TB tobetobe
apconfig ssid:TB, psw:tobetobe
[3647
.# 6
3# 0
]# <
I# >
n# e
t# mgr start wifi

[3648.380]<D>w800_api WIFI SOFT RESET OK


[3648.510]<I>netmgr_wifi ssid{TB}, psk{tobetobe}


[3651.720]<I>netmgr IP: 192.168.11.229

[3651.720]<D>APP net got ip

If you don't want to bother connecting to WiFi through the command line every time, you can uncomment the WiFi connection function in the program.

In the init.c file

netmgr_config_wifi(app_netmgr_hdl, "TB", 2, "tobetobe", strlen("tobetobe"));

This code can automatically connect to the configured WiFi after burning the program. The WiFi name and password need to be set in advance.

The character length must also be correct.

Send now

player play http://96.ierge.cn/15/235/471729.mp3

The music will play. Nowadays, there are fewer and fewer online MP3 playback websites that can directly play downloaded music. It is hard to find them. You can try to change the number after the URL to change the music.

I have been looking for this website for a long time, so I'll just use it for now.

After testing, I found that the default playback volume was very loud, which caused a lot of music to have a high pitch and then produce a wave phenomenon. With the reminder of my group friends, I changed the gain size to solve this problem.

If you lower the gain, there will be no popping sound. The default is 160, I changed it to 128

player_t *get_player_demo()
{
    if (!g_player) {
        ply_conf_t ply_cnf;

        player_conf_init(&ply_cnf);               // 初始化播放器默认配置
        ply_cnf.vol_en         = 1;               // 使能数字音量功能
        ply_cnf.vol_index      = 160;             // 0~255
        ply_cnf.event_cb       = _player_event;   // 播放事件回调函数
        ply_cnf.period_num     = 12;              // 底层音频输出缓冲周期,用于控制音频输出缓冲大小
        ply_cnf.cache_size     = 32 * 1024;       // 网络时的播放缓冲大小

        g_player = player_new(&ply_cnf);          // 创建播放器
    }

    return g_player;
}

Finally, let’s take a look at the playback effect. Adding an empty express paper box as the sound cavity will achieve better results.


Latest reply

How to achieve continuous playback? player_play(get_player_demo(), url, 0); This function can only play once, how to modify it?   Details Published on 2022-3-24 21:05
 
 

9702

Posts

24

Resources
2
 

Sounds good. Is there buffering when listening online?

Comments

Default 32K buffer  Details Published on 2022-3-18 18:06
 
 
 

7

Posts

0

Resources
3
 
littleshrimp posted on 2022-3-18 17:46 It sounds good. Is there buffering when listening online?

Default 32K buffer

Comments

not bad  Details Published on 2022-3-18 18:07
 
 
 

9702

Posts

24

Resources
4
 
hayden. Published on 2022-3-18 18:06 Default 32K buffer

not bad

 
 
 

6818

Posts

11

Resources
5
 

I found the volume setting, which is great. I can adjust the volume by pressing buttons. . .

Comments

Good idea  Details Published on 2022-3-18 19:42
 
 
 

7

Posts

0

Resources
6
 
lugl4313820 posted on 2022-3-18 18:56 I found a way to set the volume, which is great. You can use buttons to adjust the volume. . .

Good idea

 
 
 

7422

Posts

2

Resources
7
 

Really good

Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

149

Posts

0

Resources
8
 
Is this connected to the router's WIFI?

Comments

Yes, any wifi that can connect to the Internet will do, you can also create a hotspot on your phone  Details Published on 2022-3-20 20:14
 
 
 

7

Posts

0

Resources
9
 
Mengxi Kaiwu published on 2022-3-20 10:37 Is this connected to the router's WIFI?

Yes, any wifi that can connect to the Internet will do, you can also create a hotspot on your phone

 
 
 

29

Posts

0

Resources
10
 
This post was last edited by yangxz on 2022-3-21 12:39

I want to ask why your source code has so many detailed comments? Why is there so little comment in the source code I downloaded? I also looked for many online MP3 file links for this online music player, but couldn't find any. Finally, I had no choice but to upload an MP3 to the company's website space. Depressed! Haha!

I will also send my music to everyone for everyone to test!

http://www.xayldz.com/yingqin.mp3 Wang Qi's wedding reception

 
 
 

149

Posts

0

Resources
11
 

How to achieve continuous playback? player_play(get_player_demo(), url, 0); This function can only play once, how to modify it?

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list