中文页 | English
mp3player is a simple mp3 format music player that provides functions for playing mp3 files,decode id3v1,id3v2 tag, supporting functions such as play, stop, pause, resume, seek,and volume adjustment.
Folder | Description |
---|---|
src | Core source code, which mainly implements mp3 playback and tag decode, and export Finsh command line |
inc | Header file directory |
The mp3player package complies with the Apache 2.0 license, see the LICENSE
file for details.
--- mp3 player: Minimal music player for mp3 file play.
[*] Enable mp3 player
(sound0) The play device name
(2048) mp3 input buffer size
(4608) mp3 output buffer size
(50) mp3 player default volume
Version (v1.0.0) --->
The play device name: Specify the sound card device used for playback, default sound0
Common functions of mp3player have been exported to Finsh command line for developers to test and use.
The functions provided by the play command are as follows
msh />mp3play -help
usage: mp3play [option] [target] ...
usage options:
-h, --help Print defined help message.
-s URI, --start=URI Play mp3 music with URI(local files).
-t, --stop Stop playing music.
-p, --pause Pause the music.
-r, --resume Resume the music.
-v lvl, --volume=lvl Change the volume(0~99).
-d, --dump Dump play relevant information.
-j --jump Jump to seconds that given.
msh />mp3play -s bryan_adams_-_here_i_am.mp3
[I/mp3 player]: play start, uri=bryan_adams_-_here_i_am.mp3
msh />------------MP3 INFO------------
Title:Here I Am
Artist:Bryan Adams
Year:2002
Comment:Spirit: Stallion Of The Cimarr
Genre:Blues
Length:04:45
Bitrate:320 kbit/s
Frequency:44100 Hz
--------------------------------
seek play
jump to 100 seconds
msh />mp3play -j 100
Stop play
msh />mp3play -t
[I/mp3 player] play end
msh />mp3play -p
msh />mp3play -r
msh />mp3play -v 50
msh />mp3play -d
- dump info
mp3_player status:
uri - bryan_adams_-_here_i_am.mp3
status - PLAYING
volume - 10
00:03 / 04:45
------------MP3 INFO------------
Title:Here I Am
Artist:Bryan Adams
Year:2002
Comment:Spirit: Stallion Of The Cimarr
Genre:Blues
Length:04:45
Bitrate:320 kbit/s
Frequency:44100 Hz
--------------------------------