The Wayback Machine - https://web.archive.org/web/20221206184038/https://boards.dingoonity.org/dingux-releases/madplay-play-mp3-in-background

Author Topic: Madplay - play Mp3 in background  (Read 11688 times)

SiENcE (OP)

  • Posts: 653
    • Crank Gaming (Dingux Apps)
Madplay - play Mp3 in background
« on: August 07, 2010, 07:34:17 pm »
Place the scripts somewhere on your SD-Card and add them in Gmenu2x.

You need to set "DON'T Leave" Option on the Icon of the "madplay_play.sh" Script! But only there! Otherwise it won't play.

http://sience.schattenkind.net/dingoo/madplay_background.zip

freakzen

  • Guest
Re: Madplay - play Mp3 in background
« Reply #1 on: August 07, 2010, 11:35:29 pm »
Hi,

another release from you....Thanks a lot. Is there a way to donate some money to you over click&buy? Thats the only thing I can use...
Greets,
Sascha


flaming_goat

  • Guest
Re: Madplay - play Mp3 in background
« Reply #2 on: August 07, 2010, 11:45:50 pm »
Im guessing u need to do somthing else like put music somwhere because nothing is happenning

EDIT: i know that sounds really stupid but there is no info on where to put music or the madplay dge. im confused as to what this does.
« Last Edit: August 07, 2010, 11:49:56 pm by flaming_goat »

eule

  • Posts: 889
Re: Madplay - play Mp3 in background
« Reply #3 on: August 08, 2010, 01:15:56 am »
You need to enable the file selector i think, at least i get some sound this way. However, somehow madplay crashes with almost every application i start, e.g. snes9x. Got music in Picodrive, but the console flashes through quite often.
Is that normal behaviour, or did we miss something obvious, SiENcE?  ;D

madhatter

  • Guest
Re: Madplay - play Mp3 in background
« Reply #4 on: August 08, 2010, 04:33:24 am »
You need to enable the file selector i think, at least i get some sound this way. However, somehow madplay crashes with almost every application i start, e.g. snes9x. Got music in Picodrive, but the console flashes through quite often.
Is that normal behaviour, or did we miss something obvious, SiENcE?  ;D

im guessing it crashes because snes9x has its on sounds program and clashes with madplay. picodrive has no sound so it wouldn't interfer with it. try it with psx4all or any other emulator with the -ns parameter. it sounds like this is just something nice to have say if you were reading an e-book, pdf, using the calc, etc.

good work on this sience

saturday-times

  • Posts: 18
Re: Madplay - play Mp3 in background
« Reply #5 on: August 08, 2010, 06:55:29 am »
I also get the same issue of the terminal showing in the background while running other programs. tends to happen when Start is pressed, and when I was in MAME it happened with every button press. It also only plays the first track I ever had it play (even after using the kill link, and also doing a reset) even if I select another file via selector. Great release though, I hope can work through the issues.

SiENcE (OP)

  • Posts: 653
    • Crank Gaming (Dingux Apps)
Re: Madplay - play Mp3 in background
« Reply #6 on: August 08, 2010, 12:32:50 pm »
Hi,

another release from you....Thanks a lot. Is there a way to donate some money to you over click&buy? Thats the only thing I can use...
Greets,
Sascha



Thx. Sorry only paypal. But hey, no problem, i do it not for money, just for fun :-).

The behaviour depends on the kernel/soundsystem you use, the gmenu2x version and the app you start. This are only 2 scripts start start/stop madplay (is included in your rootfs). These scripts can't change the behaviour. They only start madplay to play ONE mp3 in background.

When i use an work-in-progrss OpenDingux Kernel with an gmenu2x modified for OpenDingux i can start madplay to play a mp3 and i can start Snes9x4D and play using this emu with madplay sound.
But when i quit Snes9x4D, madplay script also quits.

1. This maybe happen, because of gmenu2x.

2. Also SDL or the SLCD driver has to be modified, to not have the "cannot initialize SDL" problem. This is already fixed in current OpenDingux Kernel but not yet official!

3. There is also a problem of gmenu2x, that you have to set the "DON'T LEAVE" option on that script that should stay in background. Otherwise the script don't stay in background. Maybe someone can explain this behaviour to me?
« Last Edit: August 08, 2010, 12:45:50 pm by SiENcE »

joyrider

  • Posts: 220
    • Willems Soft
Re: Madplay - play Mp3 in background
« Reply #7 on: August 08, 2010, 01:13:26 pm »
I think (can't remember exacty anymore) that gmenu2x uses a diffrent way depending on the "do not leave" option to start a program (check the sources for this)... Normally gmenu2x executable gets swapped with the executeable you are starting so gmenu2x is not in memory anymore, i think it has something to do that with that...

However i think you should use "daemon's" to accomplish these kind of things, you can compare a daemon with a windows service ... It's a way to have the program running in the background as a service and let it do whatever you like...

Check my fbgrab daemon sources (which stays in memory and takes a screenshot of the current screen you're seeing)... http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,1,0,0,8,275

It might give you some clues... do not that daemon does not have any code in it to not allow multiple instances of the daemon running... Getting keyboard input is no problem so you can do what you like with a certain key combination (like play next mp3, stop, pauze , whatever)...

I remember when trying to do the fbgrab daemon that i experimented with trying to write something on screen while another program was using it but this caused all sorts of problems so i'm not certain if that's even possible (left it out eventually)...

madhatter

  • Guest
Re: Madplay - play Mp3 in background
« Reply #8 on: August 13, 2010, 09:26:09 pm »
is there anyway to apply this to gnuplayer? to get a kind of multi-tasking function with dingux?

SiENcE (OP)

  • Posts: 653
    • Crank Gaming (Dingux Apps)
Re: Madplay - play Mp3 in background
« Reply #9 on: August 13, 2010, 11:24:07 pm »
I think (can't remember exacty anymore) that gmenu2x uses a diffrent way depending on the "do not leave" option to start a program (check the sources for this)... Normally gmenu2x executable gets swapped with the executeable you are starting so gmenu2x is not in memory anymore, i think it has something to do that with that...

However i think you should use "daemon's" to accomplish these kind of things, you can compare a daemon with a windows service ... It's a way to have the program running in the background as a service and let it do whatever you like...

Check my fbgrab daemon sources (which stays in memory and takes a screenshot of the current screen you're seeing)... http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,1,0,0,8,275

It might give you some clues... do not that daemon does not have any code in it to not allow multiple instances of the daemon running... Getting keyboard input is no problem so you can do what you like with a certain key combination (like play next mp3, stop, pauze , whatever)...

I remember when trying to do the fbgrab daemon that i experimented with trying to write something on screen while another program was using it but this caused all sorts of problems so i'm not certain if that's even possible (left it out eventually)...

I only wrote 2 small scripts to use madplay thats in every rootfs. I don't wanted to write a deamon.

joyrider

  • Posts: 220
    • Willems Soft
Re: Madplay - play Mp3 in background
« Reply #10 on: August 14, 2010, 09:30:44 am »
a deamon could still use madplay (that is in every rootfs) and gives you more control, although i do not know what would happen if you wrote the deamon, used it and started an app that use madplay as well ...

Coccijoe

  • Posts: 366
    • Underground Portables
Re: Madplay - play Mp3 in background
« Reply #11 on: October 05, 2010, 09:49:00 pm »
madplay_kill don't stop music on my dingoo, do you know why?

EDIT: nevermind, it work with madplay 0.2
« Last Edit: October 05, 2010, 10:35:59 pm by Coccijoe »