Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Apr 2014, 03:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Retrovol 0.13.1 (Volume mixer)
Post new topic   Reply to topic View previous topic :: View next topic
Page 10 of 12 [180 Posts]   Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Thu 23 Feb 2012, 06:06    Post subject:  

Code:
CXXFLAGS=" -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS  -mno-accumulate-outgoing-args -pipe -combine -Os -fno-rtti -fno-exceptions -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -ffunction-sections -fdata-sections -march=i486 -mtune=i686 "  CFLAGS=" -mno-accumulate-outgoing-args -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants -march=i486 -mtune=i686 " LDFLAGS="  -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s " ./configure --disable-rpath --prefix=/usr --sysconfdir=/etc --localstatedir=/var


if you let autotools link in all the pkg-config dependencies you lose all portability so I manually did this:

Code:
g++ -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS   -pipe -combine -Os -fno-rtti -fno-exceptions -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -ffunction-sections -fdata-sections -march=i486 -mtune=i686   -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s  -o retrovol alsa_classes.o config_settings.o config_window.o eggtrayicon.o main.o retro_slider.o -lasound -lgtk-x11-2.0


or assuming you use shared libraries you can modify src/Makefile.am
Quote:

--- retrovol_LDADD = -lasound -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
+++ retrovol_LDADD = -lasound -lgtk-x11-2.0


a more "proper" fix would be:
retrovol_LDADD = -lasound `pkg-config --libs gtk+-2.0`
(and leave it up to distros to rectify the pkg-config files appropriately so that future updates don't break due to unnecessary direct dependencies)

and now the size is under 50kb and more portable

here are the direct dependencies now:

    # objdump -x retrovol-0.12T-i486/usr/bin/retrovol |grep NEEDED
    NEEDED libasound.so.2
    NEEDED libgtk-x11-2.0.so.0
    NEEDED libstdc++.so.6
    NEEDED libm.so.6
    NEEDED libc.so.6
    NEEDED libgdk-x11-2.0.so.0
    NEEDED libcairo.so.2
    NEEDED libX11.so.6
    NEEDED libgobject-2.0.so.0
    NEEDED libglib-2.0.so.0


This is what they were:
    # objdump -x retrovol-0.12/usr/bin/retrovol |grep NEEDED
    NEEDED libasound.so.2
    NEEDED libX11.so.6
    NEEDED libgtk-x11-2.0.so.0
    NEEDED libgdk-x11-2.0.so.0
    NEEDED libatk-1.0.so.0
    NEEDED libgdk_pixbuf-2.0.so.0
    NEEDED libpangocairo-1.0.so.0
    NEEDED libpango-1.0.so.0
    NEEDED libcairo.so.2
    NEEDED libgobject-2.0.so.0
    NEEDED libgmodule-2.0.so.0
    NEEDED libdl.so.2
    NEEDED libglib-2.0.so.0
    NEEDED libstdc++.so.6
    NEEDED libm.so.6
    NEEDED libgcc_s.so.1
    NEEDED libc.so.6
retrovol_NLS-0.12T-i486.pet
Description 
pet

 Download 
Filename  retrovol_NLS-0.12T-i486.pet 
Filesize  5.19 KB 
Downloaded  312 Time(s) 
retrovol-0.12T-i486.pet
Description  I shrunk the icon size a bit too, feel free to revert if I "uglified" them
pet

 Download 
Filename  retrovol-0.12T-i486.pet 
Filesize  24.19 KB 
Downloaded  332 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 824
Location: Oregon USA

PostPosted: Mon 27 Feb 2012, 13:22    Post subject: Retrovol master volume control
Subject description: Logarithmic?
 

I've used several versions of retrovol, and the volume characteristic doesn't seem right. Almost no change in the lower two thirds with very rapid changes in the upper range. Also I can't actually mute it at the bottom, even though it shows the red X.

Shouldn't it give an approximately equal change in perceived volume for each equal slider increment?

Using QuirkyNop-1.2 and GNOME-MPlayer

Thanks
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 27 Feb 2012, 16:09    Post subject:  

I suspect that different sound cards might use different curves, because it seems fine on my end. Right now I'm just linearly using the value range that Alsa reports. I'll add an entry to my todo list to add some other optional scales in case user hardware or preference differs from my own.
_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Mon 27 Feb 2012, 17:33    Post subject: Re: Retrovol master volume control
Subject description: Logarithmic?
 

Henry wrote:
Shouldn't it give an approximately equal change in perceived volume for each equal slider increment?
I have often had the same perception and wonder if it could be logarithmic v. linear scale issue (since sound is measured in decibels) but I took it as part of the "retro". Now if only it went to 11.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 824
Location: Oregon USA

PostPosted: Mon 27 Feb 2012, 19:39    Post subject:
Subject description: Logarithmic/
 

Thanks, guys,

I had mentioned using Gnome-Mplayer but that's probably irrelevant - actually the small volume control in the mplayer GUI works fine by itself.

The computer is a Dell Optiplex 745, with
ADI 1983 High Definition Audio
Stereo conversion 20-bit A-D; 20-bit D-A

I can't really remember, but it could be my previous computer didn't have this problem since I didn't notice it then.
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 27 Feb 2012, 21:02    Post subject:  

If anybody is interested in having it changed right now, there are only two lines of source code that would need adjusting. Otherwise, you'll have to wait until I get around to adding it proper, which is more work since I want it to be optional - I'm kind of busy lately so I might not work on it for a week or two. Also, this hasn't been tested thoroughly - it is possible that in some situations near the maximum and minimum volume levels you might have trouble getting it to completely max (or min) out. I will test that more rigorously when I implement it for real.

Anyway, the changes are to the alsa_classes.cpp file. The lines to change are 161 and 167, in the scale_out and scale_in functions.

Here is the original code:
Code:
//this is used internally to scale a number to be from 0-100
int Element::scale_out(int num){
        if(max-min==0){ return(num); }
        return(ceil(100.0*(num-min)/(max-min)));
}
//this is the inverse of scale_out; it's used to take a 0-100 number and put it
//into the proper scale for the element to understand
int Element::scale_in(int num){
        if(max-min==0){ return(num); }
        return(floor((num*(max-min)/(100))+min));
}

And here is the modified code:
Code:
//this is used internally to scale a number to be from 0-100
int Element::scale_out(int num){
        if(max-min==0){ return(num); }
        return(ceil(pow(100.0, (num-min)/(double)(max-min))));
}
//this is the inverse of scale_out; it's used to take a 0-100 number and put it
//into the proper scale for the element to understand
int Element::scale_in(int num){
        if(max-min==0){ return(num); }
        return(round((log(num)/log(100)*(max-min))+min));
}


And here is the diff, if you prefer that format:
Code:
--- src/alsa_classes.cpp   (revision 181)
+++ src/alsa_classes.cpp   (working copy)
@@ -158,13 +158,13 @@
 //this is used internally to scale a number to be from 0-100
 int Element::scale_out(int num){
    if(max-min==0){ return(num); }
-   return(ceil(100.0*(num-min)/(max-min)));
+   return(ceil(pow(100.0, (num-min)/(double)(max-min))));
 }
 //this is the inverse of scale_out; it's used to take a 0-100 number and put it
 //into the proper scale for the element to understand
 int Element::scale_in(int num){
    if(max-min==0){ return(num); }
-   return(floor((num*(max-min)/(100))+min));
+   return(round((log(num)/log(100)*(max-min))+min));
 }
 //this will grab the highest value in the element
 int Element::get(){


If you wanted some other scaling formula, these two functions are where you'd define it.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Henry

Joined: 29 Jul 2006
Posts: 824
Location: Oregon USA

PostPosted: Mon 27 Feb 2012, 23:02    Post subject:  

OK! I can see a little that your doing with the pow and log, but I'm not used to getting into and out of source code, so will be happy to wait for you to do that.

Otherwise, it's a nice program (I think Barry said "superb".) But in my experience the curve is sufficiently off to be annoying.

Thanks
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3083
Location: Ontario

PostPosted: Sat 02 Jun 2012, 16:42    Post subject:  

I tried retrovol on the latest porteus.org linux distribution
(32-bit
and found that it works well except that when it is
launched it hides behind the upper most window Crying or Very sad

Download here

So if it's launched from a gtkdialog script
it will be located behind the script window.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6378
Location: Auckland, New Zealand

PostPosted: Sat 02 Jun 2012, 19:46    Post subject:  

Perhaps it is somehow being caught by a window manager trying to prevent programs from "stealing the focus". What window manager is in Porteus?
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3083
Location: Ontario

PostPosted: Wed 06 Jun 2012, 19:40    Post subject:  

xcfe.org seems to have it's own window manager???.

Porteus has a popup list of open windows like Openbox.

I'll try to change focus setting in config and see
if there's a difference.

Thanks for advice.
_______________________________
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 824
Location: Oregon USA

PostPosted: Wed 18 Jul 2012, 08:20    Post subject: Volume control curve
Subject description: Hoping for fix
 

Posted: Mon Feb 27, 2012 5:02 pm Post subject:

Pizzasgood wrote:
Quote:
If anybody is interested in having it changed right now, there are only two lines of source code that would need adjusting. Otherwise, you'll have to wait until I get around to adding it proper, which is more work since I want it to be optional - I'm kind of busy lately so I might not work on it for a week or two. Also, this hasn't been tested thoroughly - it is possible that in some situations near the maximum and minimum volume levels you might have trouble getting it to completely max (or min) out. I will test that more rigorously when I implement it for real.

Anyway, the changes are to the alsa_classes.cpp file. The lines to change are 161 and 167, in the scale_out and scale_in functions.


As I commented above, great - I'll wait. My skills are not up to that, having never compiled anything. I do know this is an annoying deficiency in retrovol. I just returned to using it after leaving a minimal absvolume. That the curve is so crowded at the top is perhaps not so bad as the lack of a true mute.

This is your baby and I hope you will treat it right in this respect too. Apologies if the deficiency is somehow aggravated in my setup, but doing it right can only help. Thanks in advance!
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6378
Location: Auckland, New Zealand

PostPosted: Thu 14 Feb 2013, 04:54    Post subject:  

Another minor "issue" is that it segfaults if there is no mixer available (i.e. if sound is not working). I can think of a couple of alternative behaviours for this situation...
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6378
Location: Auckland, New Zealand

PostPosted: Fri 22 Feb 2013, 23:34    Post subject: Re: Volume control curve
Subject description: Hoping for fix
 

Henry wrote:
...
That the curve is so crowded at the top is perhaps not so bad as the lack of a true mute.
...

It has a "true mute" as far as I can tell. Am I missing something, or are you?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 824
Location: Oregon USA

PostPosted: Sat 23 Feb 2013, 01:34    Post subject: Re: Volume control curve
Subject description: Hoping for fix
 

disciple wrote:
Henry wrote:
...
That the curve is so crowded at the top is perhaps not so bad as the lack of a true mute.
...

It has a "true mute" as far as I can tell. Am I missing something, or are you?

Yes, it's entirely possible, and likely, that I'm missing something. My main objection was the "curve" that makes adjustment rather "touchy."

The whole mixer thing is apparently very capable and thus complicated. The only thing I use is the screen bar (front?), and I would prefer to have this simulate a conventional audio potentiometer that was at zero level, i.e. mute, at the extreme left/bottom/counterclockwise.

A problem for me is that there are a number of volume controls. Different apps have their own, mplayer, youtube, etc, and these can blast past the front control. Is there a simple tutorial for all this, like what is IEC958, and should it be checked, etc?
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6378
Location: Auckland, New Zealand

PostPosted: Sat 23 Feb 2013, 04:27    Post subject: Re: Volume control curve
Subject description: Hoping for fix
 

Quote:
My main objection was the "curve" that makes adjustment rather "touchy."

Like Pizzasgood, I've always found the "curve" fine on my hardware. But you might find it helps to use the slider (rather than the mouse scroll wheel) and go into the options and make it really long.
Henry wrote:
...
The only thing I use is the screen bar

If I understand correctly, you're saying you only use the main slider that comes up when you click on the icon, i.e. you don't use the "full window" available from a right-click on the icon, which provides a number of controls.
Quote:
(front?),

You might have it controlling something called "front" on your machine. I think it would most often default to controlling something called "Master playback" or similar. It is configurable - look on the "tray" tab in the preferences.
Quote:
and I would prefer to have this simulate a conventional audio potentiometer that was at zero level, i.e. mute, at the extreme left/bottom/counterclockwise.

You're saying you want a knob rather than a slider? There are other tray applets which provide that if you want to check them out... although knob vs slider wouldn't itself make any difference to the "curve".

A problem for me is that there are a number of volume controls. Different apps have their own, mplayer, youtube, etc, and these can blast past the front control.[/quote]
Personally I like to configure all my applications to use a software volume control, which I use initially to adjust them all to output at similar levels, and then I just use retrovol when I need to adjust the volume on any particular occasion.
Quote:
Is there a simple tutorial for all this, like what is IEC958, and should it be checked, etc?

I'm not sure there could be a simple tutorial, because different sound cards seem to have all sorts of weird and wonderful controls, or names for them.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

Last edited by disciple on Sat 23 Feb 2013, 07:21; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 10 of 12 [180 Posts]   Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1128s ][ Queries: 13 (0.0167s) ][ GZIP on ]