My Location Message Board E-Mail
pcbypaul
pc software, repair
      return to
    Homepage
bg

 
WP Clipart

Not Just for Geeks Anymore
Scripts 'N Tips
Xterm Use
Firefox Updating
update Java
Firefox Keys
Themes offline
Start Firefox
Kill Firefox
Firefox 16x16
Firefox Problems
Compiling
Compile wxPython
Disk Usage
CD Player
cdArray
Find-Installed
Backgrounds
Gimp Splash
Links
LinuxPackages
IceWalkers
Freshmeat
Linux Today
Slashdot



CD-Player

  This page has Scripts to play audio CDs with Audacious.

I use two diffferent scripts, one for use with mounting links set up in fstab, the other for when you are using HAL/dbus and the links on your desktop ship a device name to the program (the script) you link to that shortcut.



Background - Audacious and audio CDs

You can start audacious and open a CD, if you have configured the path to your CD player within Audacioius (editing the Audio CD plugin.) -- Bit of a hassle, that, especially if you have a couple players and switch or don't want to dig around the configuration...


Audacious config file wants the device and directory (mount point) for the audio CD. My scripts are very Absolute-11.1.x specific, so I won't bother to post them here for general use, except as an example of how to set up on your own system.


fstab generated links

My CD-scripts send the bare device name to the first Audio CD script. (ie. cdrom, dvd, etc)

#!/bin/bash
# Audio CD playing script for use with old-style /dev and /mnt points.  
# Called from CDArray scripts that are used when not auto-mounting.
#
caller=$1
if [ "$caller" = "" ]; then
	exit
fi
cfile="$HOME/.config/audacious/config"
if [ ! -e "$cfile" ]; then
	cp /usr/share/audacious/config.sample $cfile
fi
mdev=/dev/$caller
mdir=/mnt/$caller
dv=`grep "^device=" $cfile`
dr=`grep "^directory=" $cfile`
cat $cfile | sed s!"$dr"!"directory=$mdir"!1 > $cfile
cat $cfile | sed s!"$dv"!"device=$mdev"!1 > $cfile
audacious $mdir&
exit 0

HAL generated links

The HAL/dbus version accepts the device name as generated by HAL:

#!/bin/bash
#
# this script will reconfigure and play an audio CD with Audacious using DeviceManager
# ie: dbus/HAL and the automountying crew :)
#
mdev=$1
mdir=/media/cdrom

if [ "$mdev" = "" ]; then
	exit
fi

if [ ! -e "$HOME/.config/audacious/config" ]; then
	cp /usr/share/audacious/config.sample $HOME/.config/audacious/config
fi
dv=`grep "^device=" $HOME/.config/audacious/config`
dr=`grep "^directory=" $HOME/.config/audacious/config`
cat $HOME/.config/audacious/config | sed s!$dr!directory=$mdir!1 > $HOME/.config/audacious/config
cat $HOME/.config/audacious/config | sed s!$dv!device=$mdev!1 > $HOME/.config/audacious/config
audacious $mdir&
exit 0





Sample Audacious config file:

[ALSA]
volume_right=100
volume_left=100
soft_volume=FALSE
mixer_device=PCM
mixer_card=0
pcm_device=default
period_time=100
buffer_time=500
[audacious]
filesel_path=/MyLinux
allow_multiple_instances=FALSE
use_realtime=FALSE
always_show_cb=TRUE
convert_underscore=TRUE
convert_twenty=TRUE
convert_slash=TRUE
show_numbers_in_pl=TRUE
show_separator_in_pl=TRUE
snap_windows=TRUE
save_window_positions=TRUE
dim_titlebar=TRUE
get_info_on_load=FALSE
get_info_on_demand=TRUE
eq_doublesize_linked=TRUE
no_playlist_advance=FALSE
refresh_file_list=TRUE
sort_jump_to_file=FALSE
use_pl_metadata=TRUE
warn_about_unplayables=TRUE
use_backslash_as_dir_delimiter=FALSE
player_shaded=FALSE
player_visible=TRUE
shuffle=FALSE
repeat=FALSE
doublesize=FALSE
autoscroll_songname=TRUE
stop_after_current_song=FALSE
playlist_shaded=FALSE
playlist_visible=FALSE
use_fontsets=FALSE
equalizer_visible=FALSE
equalizer_active=FALSE
equalizer_shaded=FALSE
equalizer_autoload=FALSE
easy_move=FALSE
use_eplugins=FALSE
always_on_top=FALSE
sticky=FALSE
random_skin_on_play=FALSE
pause_between_songs=FALSE
show_wm_decorations=FALSE
eq_extra_filtering=TRUE
analyzer_peaks=TRUE
custom_cursors=TRUE
close_dialog_open=TRUE
close_dialog_add=TRUE
resume_playback_on_startup=FALSE
playlist_detect=FALSE
show_filepopup_for_tuple=TRUE
recurse_for_cover=FALSE
use_file_cover=FALSE
use_xmms_style_fileselector=FALSE
use_extension_probing=TRUE
filepopup_showprogressbar=TRUE
player_x=0
player_y=323
timer_mode=0
vis_type=0
analyzer_mode=0
analyzer_type=1
scope_mode=0
vu_mode=1
voiceprint_mode=0
vis_refresh_rate=0
analyzer_falloff=3
peaks_falloff=1
playlist_x=0
playlist_y=0
playlist_width=275
playlist_height=232
playlist_position=0
equalizer_x=0
equalizer_y=0
snap_distance=10
pause_between_songs_time=2
mouse_wheel_change=8
scroll_pl_by=3
titlestring_preset=2
resume_playback_on_startup_time=2583
output_buffer_size=3000
recurse_for_cover_depth=0
filepopup_pixelsize=150
filepopup_delay=20
colorize_r=255
colorize_g=255
colorize_b=255
mainwin_use_xfont=FALSE
playlist_font=Sans Bold 8
mainwin_font=Sans Bold 9
eqpreset_default_file=dir_default.preset
eqpreset_extension=preset
generic_title_format=%{p:%p - %}%{a:%a - %}%t
cover_name_exclude=back
equalizer_preamp=0
equalizer_band0=-4
equalizer_band1=-3.2
equalizer_band2=-16
equalizer_band3=-4.8
equalizer_band4=0
equalizer_band5=2.4
equalizer_band6=8
equalizer_band7=8
equalizer_band8=8.8
equalizer_band9=6.4
skin=/usr/share/audacious/Skins/ojxmms-1.0
url_history_length=0
output_plugin=/usr/lib/audacious/Output/libALSA.so
[AudioCompress]
anticlip=FALSE
target=0
gainmax=0
gainsmooth=0
buckets=0
[CDDA]
device=/dev/cdrom
directory=/mnt/cdrom
mixer=2
readmode=1
num_drives=1
title_override=FALSE
name_format=%p - %t
use_cddb=TRUE
cddb_server=freedb.freedb.org
cddb_protocol_level=0

Tux Pages created and served by Linux Graphics made/edited by the Gimp   Created with the Gimp byPaul