Madplay Is Frustrating Me :)


Drak

fff
Joined
Mar 29, 2005
Messages
1,225
Age
36
Location
Canada!
Website
Visit site
Ok I got this written out in a executable gpe to run madplay in the background with drmd.

Code:
 #!/bin/sh
mount /mnt/sd -o remount,sync
/mnt/sd/bin/madplay --adjust-volume=0 -z -r /mnt/sd/music/*.mp3&
cd /mnt/sd/
/mnt/sd/DrMD.gpe
sync
mount /mnt/sd -o remount,async
madplay_pid=`pidof madplay`
echo "kill -9 $madplay_pid" >> /mnt/sd/bin/madplay_output.txt
kill -9 $madplay_pid
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
So far I have no luck with it. I get a black screen. Can someone tell me whats wrong? Or does this not work properly yet :p I wont give up!

Thanks.
 
Oh and heres what it says in the readme :p Im sure i followed it right.

madplaygp2x is a port of madplay commandline mp3 player (http://www.underbit.com/products/mad/)

Running madplaygp2x standalone example:
/mnt/sd/bin/madplay --adjust-volume=0 --sdl-control -z -r /mnt/sd/mp3s/*.mp3

--adjust-volume starts the initial volume at 0 decibels. Accepted values:
(-175 to 16). For me 0 is decent without the headphones, about -25
is good for starters with headphones.
--sdl-control lets you use the game pad to control the player
right - next song in list
left - previous song in list
select - pause
start - exit
vol- - decrease volume (need to fix: it takes almost a second to register the decrease)
vol+ - increase volume (need to fix: it takes almost a second to register the increase)
mute - x
-z shuffle playlist
-r randomize playlist

Running madplaygp2x in the background while you play a(n) game/emulator/application:
/mnt/sd/bin/madplay --adjust-volume=0 -z -r /mnt/sd/mp3s/*.mp3&

No controls are available to the player when it is run this way. All controls
are taken by the game/emulator/application. Which means you need to set any
options you want on the command line. Also each song will play until
its completed.

Full commandline usage:

Usage: /mnt/sd/bin/madplay [OPTIONS] FILE [...]
Decode and play MPEG audio FILE(s).

Verbosity:
-v, --verbose show status while decoding
-q, --quiet be quiet but show warnings
-Q, --very-quiet be quiet and do not show warnings
--display-time=MODE use default verbose time display MODE
(remaining, current, overall)

Decoding:
--downsample reduce sample rate 2:1
-i, --ignore-crc ignore CRC errors
--ancillary-output=PATH write ancillary data to PATH

Audio output:
-o, --output=[TYPE:]PATH write output to PATH with format TYPE (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 songs over DURATION (default 0:05)
-a, --attenuate=DECIBELS attenuate signal by DECIBELS (-)
-a, --amplify=DECIBELS amplify signal by DECIBELS (+)
-A, --adjust-volume=DECIBELS override per-file volume adjustments
-G, --replay-gain[=PROFILE] enable Replay Gain volume adjustments using
PROFILE (radio, audiophile)

Channel 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 output

Playback:
-s, --start=TIME skip to begin at TIME (HH:MM:SS.DDD)
-t, --time=DURATION play only for DURATION (HH:MM:SS.DDD)
-z, --shuffle randomize file list
-r, --repeat[=MAX] play files MAX times, or indefinitely
--tty-control enable keyboard controls
--no-tty-control disable keyboard controls
--sdl-control enable sdl joystick controls
--no-sdl-control disable sdl joystick controls

Miscellaneous:
-T, --show-tags-only show ID3/encoder tags only (do not decode)
-V, --version display version number and exit
--license show copyright/license message and exit
-h, --help display this help and exit

Supported output formats:
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 output (decode only)
 
Drak posted on Dec 23 2005 at 02:32 AM said:
Has anyone got this working? At least tell me that so I can stop crying :)

Works fine for me, although DrMD runs rather slowly (1 fps when I tried to play Outrun with Alice Cooper's Poison playing ;)
BTW, quitting DrMD automatically takes you back to the menu, the rest of the script gets ignored (unless that's just the old version).
 
Last edited by a moderator:
paeryn posted on Dec 22 2005 at 06:24 PM said:
Drak posted on Dec 23 2005 at 02:32 AM said:
Has anyone got this working? At least tell me that so I can stop crying :)

Works fine for me, although DrMD runs rather slowly (1 fps when I tried to play Outrun with Alice Cooper's Poison playing ;)
BTW, quitting DrMD automatically takes you back to the menu, the rest of the script gets ignored (unless that's just the old version).

Could you give me the code [like the stuff above i posted] or something so I can try? :0 That would be really helpfull as I cant get it to work rite. heh
 
Last edited by a moderator:
i want to play mp3s in the background while reading ebooks, how the hell do i use this program? do i need anything else but madplay? i dun no nuthin!
 
Drak posted on Dec 23 2005 at 03:54 AM said:
Could you give me the code [like the stuff above i posted] or something so I can try? :0 That would be really helpfull as I cant get it to work rite. heh

I copied the code you posted, minus the mount commands since mount complains about /mnt/sd not being in /etc/fstab

I read somewhere about the gp2x not liking DOS-style CR+LF in shell scripts, I've put my version here http://paeryn.myby.co.uk/mad_md.gpe
 
Last edited by a moderator:
paeryn posted on Dec 22 2005 at 08:26 PM said:
Drak posted on Dec 23 2005 at 03:54 AM said:
Could you give me the code [like the stuff above i posted] or something so I can try? :0 That would be really helpfull as I cant get it to work rite. heh

I copied the code you posted, minus the mount commands since mount complains about /mnt/sd not being in /etc/fstab

I read somewhere about the gp2x not liking DOS-style CR+LF in shell scripts, I've put my version here http://paeryn.myby.co.uk/mad_md.gpe

Ty, will test it now .. boy im dumb I had no idea , I just edited the quake one that came with the dl. Hopefully it works :lol:
 
Last edited by a moderator:
If you need a text editor to write scripts using the Unix style CR+LF, you might want to look into EditPad. There's a free version available and it will do what you need it to.
 
could someone make me one for use with the Ebook reader, i think im too dumb/ignorant to do it myself! or show me what to change to do it myself
 
Ok Igot a problem.. It wont run the mp3s, it basically ignores em and just runs drmd instead.

I know its not working properly since drmd is running at fullspeed still heh. Maybe the problem is that I shouldnt use the folder music/ and go with the orig setup of mp3/ as a folder.. Hmm but i changed the command line to use music/ as it.. Oh well im going to bed now :p


And trition the readme should tell u how to do that.. I think..
 
think is its al greek to me, as the saying goes, i havent any idea WTF its sayin lol
 
Drak posted on Dec 23 2005 at 07:26 AM said:
Ok Igot a problem.. It wont run the mp3s, it basically ignores em and just runs drmd instead.

I know its not working properly since drmd is running at fullspeed still heh. Maybe the problem is that I shouldnt use the folder music/ and go with the orig setup of mp3/ as a folder.. Hmm but i changed the command line to use music/ as it.. Oh well im going to bed now :p

You have put the madplay files in a directory named /bin haven't you?

You got to go to bed? Lucky you, I was up 'til 6:30 coding and needed to be awake for the postie, who didn't come 'til after 12... Need sleep :wacko:

Triton:
Change the line "/mnt/sd/DrMD.gpe" to "/usr/gp2x/EBookViewer" that should do it.
 
Last edited by a moderator:
i tried that grrr i put this
Code:
#!/bin/sh

/mnt/sd/bin/madplay --adjust-volume=0 -z -r /mnt/sd/music/*.mp3 &
cd /mnt/sd/
/usr/gp2x/EBookViewer
sync
madplay_pid=`pidof madplay`
echo "kill -9 $madplay_pid" >> /mnt/sd/bin/madplay_output.txt
kill -9 $madplay
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
and i get a black screen, im editing with notepad any help?
 
triton posted on Dec 23 2005 at 09:31 PM said:
im editing with notepad

There's your problem. Use Programmer's Notepad (google it) and the go to Tools->Line Endings->Unix (LF). Then all the line endings will be in Unix and the GP2X will like it.
 
Last edited by a moderator:
Ok Dookie.. Uhh I fixed it.. woot

Code:
#!/bin/sh

cd /mnt/sd/bin
/mnt/sd/bin/madplay --adjust-volume=0 -z -r /mnt/sd/music/*.mp3 &
cd /mnt/sd/
/mnt/sd/DrMD.gpe
sync
madplay_pid=`pidof madplay`
echo "kill -9 $madplay_pid" >> /mnt/sd/bin/madplay_output.txt
kill -9 $madplay
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu

Heh woot, the cd /mnt/sd/bin is all I needed I guess. now I can tweak it to be playable :)
thx for the help paeryn! :D

Woot shining force 2 at 2fps! lol!!!

anyway.. now I gotta figure out how to mute drmd so it runs faster without turning off my mp3s, i try to use sound: Off but it turns off my mp3s as well :p

Back to the drawing board!
 
ARGH, i dont get this shit! i have it exactly how you all say it should be, even use that programmers notebook and nada! i get a black screen that i can exit out of with start, nothing else
 
Back
Top