MadPlayergp2x
madplaygp2x is the port of the command line MP3 player madplay. It was ported by Domm.
The Source Code is available at the archive.
Launch madplaygp2x as a simple player
- Example of command line: /mnt/sd/bin/madplay -- adjust-volume=0 -- sdl-control - Z - R /mnt/sd/mp3s/*.mp3
This line indicates that one launches madplay which is located in the directory "bin" of our SD with a starting volume of 0Db with control of the player at the joystick by reading the selected file MP3 contained in the "mp3s" directory of our SD card.
- Options in this mode:
-- adjust-volume: Begin with an initial volume from 0 decibels.
The accepted values are included/understood from -175 to
16. For me 0 are a value correct without the helmet (with the HP of GP2x) With the turn of -25, is a value correct for listening with the helmet.
-- sdl-control: That you permez to use Joystick for controller the reader
Right-hand side - Its following in the list. Left - Its preceding in the list. SELECT - Pauses. START - To leave reader MP3. Flight - To decrease the sound volume (That takes 1 second before being effective). Vol+ - To increase the sound volume (That takes 1 second before being effective).
-x: Rendre le son muet.
-z: To mix the playlist.
-r: To make the playlist random.
To launch madplaygp2x behind main to be able to use a(n) Game/Emulator/Application
When the reader is launched with this type of order, the control of the reader are not available S. What leaves the buttons of free GP2x for another thing :D (Plays, Emulateurs, Applications). With the result that you must define as a preliminary what you want that the player makes by using the line of order. The pieces read in this mode are read until A what they are finished.
In this example, one launches madplay which is located in the repertory "bin" at the root of your chart SD by induquant a starting volume of 0Db with a reading alléatoire of the MP3 ad infinitum by taking the MP3 in the repertory "mp3s" located has the root of your chart SD
- Options in this mode:
Use: /mnt/sd/bin/madplay [ OPTIONS ] FILE [... ] Decode and audio play MPEG File.
Verbosity:
-v, --verbose verbose Posts the state while playing. -q, --quiet Remains silent but post errors. -Q, --very-quiet Remains silent and does not post the errors.. --display-time=MODE use default verbose time display MODE (remaining, current, overall)
Decoding:
--downsample Reduce the sample rate 2:1. -i, --ignore-crc Ignorer the erreors of CRC. --ancillary-output=PATH Ecrire ancillary data to PATH.
Audio Output:
-o, --output=[TYPE:]PATH To write output STANDARD to PATH with format (below). - B, -- bit-depth=DEPTH request DEPTH bits per sample. -R, --sample-rate=HERTZ request HERTZ samples per second. -d, --no-dither do not dither output PCM samples. --fade-in[=DURATION] Fade in over a period of time (DURATION) (Par Défaut 0:05). -a, --attenuate=DECIBELS Decrease the signal in DECIBELS (-) -a, --amplify=DECIBELS Increase the signal in DECIBELS (+) -A, --adjust-volume=DECIBELS Override per-file volume adjustments -G, --replay-gain[=PROFILE] Enable Replay Gain volume adjustments using PROFILE (radio, audiophile)
Output Selection:
-1, --left output first (left) channel only -2, --right output second (right) channel only -m, --mono mix left and right channels for monaural output -S, --stereo Force stereo.
Selection:
-s, --start=TIME This to move to start at time (TIME) (HH:MM:SS.DDD). -t, --time=DURATION To play the music only for one duration (DURATION) (HH:MM:SS.DDD). -z, --shuffle Randomize file list. -r, --repeat[=MAX] To play the files with the MAX of their duration, or indefiniment. --tty-control To activate controls keyboard. --no-tty-control To deactivate controls keyboard. --sdl-control To activate controls with the joystick sdl (Player controlled by Joystick of GP2x). --no-sdl-control To deactivate controls with the joystick sdl
Special:
-T, --show-tags-only To only post Tags ID3/encoder (Not decoding). -V, --version Posts the version number and quits. --license Poster the message of copyright/license and quits. -h, --help Shows help and quits.
Formats supported:
cdda CD audio, 16-bit big-endian 44100 Hz stereo PCM (*.cdr, *.cda) aiff Audio IFF, [16-bit] PCM (*.aif, *.aiff) wave Microsoft RIFF/WAVE, [16-bit] PCM (*.wav) snd Sun/NeXT audio, 8-bit ISDN mu-law (*.au, *.snd) raw binary [16-bit] host-endian linear PCM hex ASCII hexadecimal [24-bit] linear PCM null No exit (decode only)
Usage
To use it, it will be necessary for you either to pass by the Sterm terminal, or to create you a gpe file with a text editor (attention the return chariau Windows do not function with).
- A file GPE for launching madplayer as a decoder mode:
mount /mnt/sd - O remount, sync Cd /mnt/sd/bin/ /mnt/sd/bin/madplay -- adjust-volume=0 -- sdl-control - Z - R /mnt/sd/mp3s/*.mp3 2> madplay_output.txt mount /mnt/sd - O remount, async Cd /usr/gp2x/ exec /usr/gp2x/gp2xmenu
With this you will be able to listen to MP3 and controller the reader with the joystick of your GP2x but you will be able nothing to make of other and when you leave will turn over to the menu of GP2x.
- A file GPE for launching madplayer behind plane (here one launches Quake to the continuation):
#!/bin/sh mount /mnt/sd - O remount, sync /mnt/sd/bin/madplay -- adjust-volume=10 - Z - R /mnt/sd/mp3s/*.mp3& Cd /mnt/sd/games/quake/ /mnt/sd/games/quake/quake.gpe sync mount /mnt/sd - O remount, async madplay_pid=`pidof madplay` echo "kill -9 # " > > /mnt/sd/bin/madplay_output.txt kill -9 $madplay_pid Cd /usr/gp2x/ exec /usr/gp2x/gp2xmenu
This one launches madplayer for reading our mp3, then will launch the file for quake.