Page 66 of 117

Posted: Thu 01 Nov 2012, 18:24
by zigbert
01micko wrote:Maybe a simple dependency check and exit should exist in pequalizer.

@line 25 add

Code: Select all

# dep test
if [ ! -f /usr/lib/alsa-lib/libasound_module_ctl_equal.so ]
  then echo "missing dependencies" && exit
fi
done


Thank you
Sigmund


Download pMusic 3 - Beta here

Posted: Thu 01 Nov 2012, 19:11
by zigbert
01micko wrote:Sigmund, I have some useful info for you. I must run MultipleSoundCardWizard to get sound. It then changes my default card in a newly created file /etc/asound.conf. In this case, amixer must be run with the "-c 1" option to the "controls" command.

This is what is found in /etc/asound.conf

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 0
So some routine like this might be needed:

Code: Select all

ASOUNDOPTION=""
if [ -f /etc/asound.conf ];then #see if MultipleSoundCardWizard was used
  CARD=$(head -1 /etc/asound.conf)
  DEFAULTCARD=${CARD##* }
  ASOUNDOPTION="-c $DEFAULTCARD"
fi
VOLUMECONTROL=$(amixer $ASOUNDOPTION controls | grep 'Playback Volume')
Good catch. All calls for amixer in func_mixer is using the -c switch, but in func_config it does not.
This is the code I included in func_config to detect speakers for ACTIVE card. Please test in pMusic-2.9.5

Code: Select all

#To find available speakers, we must first detect soundcard number
if [ "$SOUND_DEVICE" = "auto" ]; then
	if [ -f /etc/asound.conf ]; then #see if MultipleSoundCardWizard was used
		TMP=$(head -1 /etc/asound.conf)
		CARD_NR=${TMP##* } 
	else
		TMP="`aplay -l | grep -m 1 -F card`" #grab the first card
		CARD_NR="`echo $TMP | cut -d':' -f1 | cut -d' ' -f2`"
	fi
else
	CARD_NR="`echo $SOUND_DEVICE | cut -d':' -f1 | cut -d' ' -f2`"
fi
export SPEAKERS=`amixer -c $CARD_NR controls | grep 'Playback Volume' | cut -d "'" -f 2 | sed -e "s/ Playback Volume//g" | tr -s ' ' '_' | awk '{print "<item>"$1"</item>"}' | tr -s '_' ' '`


Download pMusic 3 - Beta here

Posted: Thu 01 Nov 2012, 19:12
by zigbert
Mick
I have updated the beta-post with links to your Precise-stuff.


Thank you
Sigmund


Download pMusic 3 - Beta here

Posted: Thu 01 Nov 2012, 19:16
by zigbert
Flash wrote:I did install Pequalizer. It didn't complain about missing libs. :?
I will add dependencies info in the next pet.


Thank you
Sigmund


Download pMusic 3 - Beta here

Posted: Thu 01 Nov 2012, 19:35
by zigbert
pMusic Beta2

All known major bugs are fixed.

Download pMusic 3 - Beta2 here

gtkdialog version

Posted: Thu 01 Nov 2012, 19:54
by don570
It wouldn't be hard to put a gtkdialog version warning in the pinstall.sh
using Thunar's method
http://murga-linux.com/puppy/viewtopic.php?t=80340

_____________________________________________

Posted: Thu 01 Nov 2012, 21:07
by zigbert
pMusic depends on more than gtkdialog. pmusic --help checks the system...... The dependency check is also available from the Help-menu and by the -D switch.


Sigmund


Download pMusic 3 - Beta2 here

Posted: Thu 01 Nov 2012, 21:13
by don570
You have the menu item in the app that does a good job
of checking dependencies but the pinstall.sh script
is the best place to warn an unsuspecting user.

______________________________________________

Posted: Fri 02 Nov 2012, 02:33
by 01micko
Sigmund

There is a major bug with "preferences" in 2.9.5, it doesn't open. I guess I will see one of these from you ... >>> :oops: <<< ... .. it's a silly syntax error, we all do them sometimes.

The other bug is that the routine to sort out the card needs to run in func_mixer too, else it just runs for the first card. Once I fixed those 2 I could set my card to PCM and the volume control works :) . Oh, I also changed the call from "cut" to "tr" in original lines 23 and 38 becuse I was getting 2 leading spaces before "Mono:" and cut was looking for field 2, which turned up blank, so better to delete and take any number of spaces out of play I guess.

I'll post the diff and also attach the tarball, the forum loses a bit of formatting.

Code: Select all

diff -ru pmusic.orig/func_config pmusic/func_config
--- pmusic.orig/func_config	2012-11-02 11:59:45.739990245 +1000
+++ pmusic/func_config	2012-11-02 01:19:00.000000000 +1000
@@ -17,7 +17,7 @@
 export SOUND_DEVICES="<item>auto</item>`aplay -l | grep -F 'card ' | awk '{print "<item>"$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10"</item>"}'`"
 #To find available speakers, we must first detect soundcard number
 CARD_NR="`echo $SOUND_DEVICE | cut -d':' -f1 | cut -d' ' -f2`"
-if [ "$SOUND_DEVICE" = "auto" ]
+if [ "$SOUND_DEVICE" = "auto" ]; then
 	if [ -f /etc/asound.conf ]; then #see if MultipleSoundCardWizard was used
 		TMP=$(head -1 /etc/asound.conf)
 		CARD_NR=${TMP##* } 
diff -ru pmusic.orig/func_mixer pmusic/func_mixer
--- pmusic.orig/func_mixer	2008-01-03 03:19:56.000000000 +1000
+++ pmusic/func_mixer	2012-11-02 12:11:30.579505135 +1000
@@ -2,8 +2,15 @@
 
 [ ! "$SPEAKER" ] && . $HOME/.pmusic/pmusicrc
 #Detect soundcard
-[ "$SOUND_DEVICE" = "auto" ] && SOUND_DEVICE="`aplay -l | grep -m 1 -F card`" #grab the first card
-CARD_NR="`echo $SOUND_DEVICE | cut -d':' -f1 | cut -d' ' -f2`"
+if [ "$SOUND_DEVICE" = "auto" ]; then
+	if [ -f /etc/asound.conf ]; then #see if MultipleSoundCardWizard was used
+		TMP=$(head -1 /etc/asound.conf)
+		CARD_NR=${TMP##* } 
+	else
+		TMP="`aplay -l | grep -m 1 -F card`" #grab the first card
+		CARD_NR="`echo $TMP | cut -d':' -f1 | cut -d' ' -f2`"
+	fi
+fi
 	
 case $1 in
 -mute)
@@ -16,7 +23,7 @@
 	fi
 	;;
 -set_volume)
-	if [ "`amixer -c $CARD_NR get "$SPEAKER" | grep 'Mono:' | cut -d ':' -f 2`" ]; then #mono
+	if [ "`amixer -c $CARD_NR get "$SPEAKER" | grep 'Mono:' | tr -d ' ' |tr -d ':'`" ]; then #mono #2 leading spaces
 		amixer -c $CARD_NR set "$SPEAKER" $VOLUME"%" > /dev/null 2>&1
 	else
 		[ ! "$BALANCE" ] && BALANCE=100 #in case in balance slider is provided in gui
@@ -31,7 +38,7 @@
 	fi
 	;;
 -get_levels)
-	if [ ! "`amixer -c $CARD_NR get "$SPEAKER" | grep 'Mono:' | cut -d ':' -f 2`" ]; then 
+	if [ ! "`amixer -c $CARD_NR get "$SPEAKER" | grep 'Mono:' | tr -d ' ' |tr -d ':'`" ]; then 
 		VOL_L=`amixer -c $CARD_NR get "$SPEAKER" | grep -m1 'Left:' | cut -d '%' -f 1 | cut -d '[' -f 2`
 		VOL_R=`amixer -c $CARD_NR get "$SPEAKER" | grep -m1 'Right:' | cut -d '%' -f 1 | cut -d '[' -f 2`
 		[ $VOL_L = 0 ] && VOL_L=1 #1 to avoid dividing with 0

Another thing, the tray icon is not working in these beta releases.

Oh, one more thing, my fault really, MultipleSoundCardWizard is puppy specific. Other distros may have different formatting of an /etc/asound.conf so maybe the test of head -1 isn't so robust. We'll think on that one eh?

Cheers

Posted: Fri 02 Nov 2012, 04:11
by Flash
Sorry I don't have time to do more thorough testing. Here's my latest result after installing the latest Pmusic and Pequalizer .pets:

Code: Select all

# pmusic
mkdir: can't create directory '/root/.pmusic/history_files': File exists
find: File system loop detected; `/root/.usr/lib/i386-linux-gnu' is part of the same file system loop as `/root/.usr/lib'.


grep:  au -: No such file or directory

/usr/local/pmusic/func_player: line 151: [: =: unary operator expected
/usr/local/pmusic/func_player: line 152: [: =: unary operator expected
#
The Pmusic GUI has a funny thing in the middle that looks like a window into something behind it, and it immediately connects with some internet radio station and starts playing heavy metal music. Not good. :lol:
After I turn that off and delete the station from the playlist, Pmusic sulls up and won't show the mp3 files when I navigate to a folder. :(

Posted: Fri 02 Nov 2012, 04:31
by zigbert
01micko wrote:here is a major bug with "preferences" in 2.9.5
>>> :oops: <<<
Worst is that I fixed it, but forgot to upload it again :roll:


Thank you for very great improvements
Sigmund

Posted: Fri 02 Nov 2012, 04:43
by zigbert
Flash
Terminal output: I have similar output at first run. But at second run everything is in place, and I get no outputs - do you?

The 'middle window' is Gtk related and out of my reach. Resize pMusic or show/hide search options, and it's gone. I could make the default size a bit bigger to hide it. The downside would be that pMusic wouldn't fit into a 600x800 screen. Or do anyone have another solution?

You might find the autoplaying of Hoovers irritating, but it is done to quickly introduce new users to the interface. What are the Left/Right pane used for?

I can not reproduce your browsing problems....


Thank you for testing
Sigmund

Posted: Fri 02 Nov 2012, 04:43
by zigbert
pMusic Beta3







Download pMusic 3 - Beta3 here

Posted: Fri 02 Nov 2012, 04:45
by 01micko
Just looking at my diff.. and my comments the "cut" delimiter is the ':' , not space, in any case the tr still works fine, and should anyway I think.

Posted: Fri 02 Nov 2012, 04:46
by zigbert
Mick
The tooltips in pEqualizer is fixed - version 0.8.2

Download pMusic 3 - Beta2 here

Posted: Fri 02 Nov 2012, 05:01
by 01micko
zigbert wrote:Mick
The tooltips in pEqualizer is fixed - version 0.8.2

Download pMusic 3 - Beta2 here
yep, saw that :)

I do have a strange issue after I index my files.Not too many on this disc, maybe 15 albums. Best to see the pic. I played the AC/DC file by clicking on it so that is why that one is there I guess.

BTW, that is after clicking Music sources >> My Music >> My Tracks

Posted: Fri 02 Nov 2012, 05:34
by zigbert
Mick
No good
How does you index file look? - /root/.pmusic/index_mymusic (or where you have pointed the data storage).
The numbers are timestamps that are written to index file when song is completed. I see that pMusic is wrinting to index file even if song is NOT in index.

I have added an extra check in func_player line 232

Code: Select all

	if grep false $WORKDIR/stop > /dev/null && ! grep -F 'error' $WORKDIR/aplay_error; then 
		#RATING: User has listen through the complete song, add to rating index
		TMP="`grep -F "${PLAYLIST}|" "$STORAGE_DIR/index_mymusic"`"
		if [ "$TMP" ]; then
			#place the last played track at top of index to get into Overview - see this
			echo "${TMP},`date +%s`" > $WORKDIR/tmp_rating
			grep -vF "${PLAYLIST}|" "$STORAGE_DIR/index_mymusic" >> $WORKDIR/tmp_rating
			mv -f $WORKDIR/tmp_rating "$STORAGE_DIR/index_mymusic"
		fi



Download pMusic 3 - Beta2 here

Posted: Fri 02 Nov 2012, 05:39
by 01micko
/root/.pmusic/index_mymusic only has the timestamps by the look. This one is a bit over my head!

Posted: Fri 02 Nov 2012, 05:43
by zigbert
Somehow the indexing must have gone wrong. Can you try to reproduce it.

The index file contains 21 fields. ie. like this:

Code: Select all

/mnt/home/mp3_streamripper/DMR_Metal_Canada_128/Within Temptation - Lost.mp3|Within Temptation|Lost|The Unforgiving|9|2011|||0|mp3 |128|05:05||/mnt/home/mp3_streamripper/DMR_Metal_Canada_128/Within Temptation - Lost.mp3||4e93ba92-212d-4ed4-83a8-cf520f978b88|eace2373-31c8-4aba-9a5c-7bce22dd140a|http://lyricwiki.org/Within_Temptation:Lost|/mnt/sdb1/musikk/pmusic storage/albumart/Within Temptation - The Unforgiving.jpg||,1351427237,1351427956,1351428368,1351429065,1351430480,1351431261,1351433294,1351434136,1351437287,1351637968,1351638276
Thank you
Sigmund



Download pMusic 3 - Beta2 here

Posted: Fri 02 Nov 2012, 06:26
by 01micko
Ok, with nothing playing, I add my music path which is /mnt/sda10/music to the gui with the + button. I delete /root and /mnt with - button (they are there by default). I index, the progress looks normal but the /root/.pmusic/index_mymusic file ends up empty. I think the file is building ok but at the finish it gets overwritten by something.

Clicking tracks and playing them adds entries to that file. Is that supposed to happen?

Radio database works normally.

Each time I am deleting /root/.pmusic so I start with a clean slate.

-----

I just stepped back to 2.9.4 and it works as expected indexing my tracks.