Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mp3 Box
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
gfunkmonk
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2002
Posts: 129
Location: Freelandville, IN

PostPosted: Tue Aug 13, 2002 2:55 am    Post subject: Mp3 Box Reply with quote

I took an Old 486 running and made a mp3 box for my home stereo. Well it works but theres a couple things I would like it to do...

1) Is there anyway to control mpg123 from a keyboard, or anyway to setup certain keys to run bash scripts or something?

2) Would it be possible to make a script, that would check /mnt/cdrom for mp3 files, and if there were, run mpg123 and if not run a cdplayer, and then if the program is exited, eject the cdrom, wait for it to be closed and start over? Maybe just something close to that would work...
Back to top
View user's profile Send private message
morrigan
n00b
n00b


Joined: 13 Aug 2002
Posts: 2

PostPosted: Tue Aug 13, 2002 9:13 pm    Post subject: Reply with quote

I don't recall about direct control from the keyboard. I know that there is an extended status mode that you can check into. If you want to go via the scripting route you can always just write some wrapper programs that send mpg123 different signals to implement some primitive behaviours.
Back to top
View user's profile Send private message
Mimamau
Apprentice
Apprentice


Joined: 11 Jun 2002
Posts: 150
Location: Germany

PostPosted: Thu Aug 15, 2002 12:48 pm    Post subject: Reply with quote

you should check out http://irmp3.sourceforge.net
they use lirc http://www.lirc.org to controll mpg123 with an remote controller. also theres support for a lcd http://lcdproc.omnipotent.net
Back to top
View user's profile Send private message
ShadyMilkman
n00b
n00b


Joined: 20 Apr 2002
Posts: 57

PostPosted: Fri Aug 16, 2002 9:28 pm    Post subject: Reply with quote

Also if you don't have a remote control it's pretty simple to make something like that in c using ncurses. Example:

Code:

#include <ncurses.h>
#include <stdlib.h>

int main(){
  bool running=true;
  int ch;
  initscr();
  raw();
  noecho();
  while(running){
     ch=getch();
     if(ch == 's'){
        system("/usr/local/bin/mpg123 -stop"); //note I don't know if that's a command, just play along
    }
    ... //set up commands
    if(ch == 'q'){
     running=false;
    }
   }
   endwin();
   return 0;
}

compile with gcc main.c -lcurses -o mpg_control
Of course that's a really simplified version but if you wanna go that route check out the curses programming howto: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum