Retrovol 0.13.1 (Volume mixer)

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#41 Post by Pizzasgood »

Okay, no problem.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

mill0001
Posts: 358
Joined: Thu 01 Feb 2007, 16:30
Location: "People's Republik of Kalifornia"

#42 Post by mill0001 »

Hi Pizza,
I posted this on another thread, but it looks like you may be able to help me. I'm using pup 4.31, "Stardust v.13". When I click on volume control in my tray my slider opens up on left of screen at the top instead of under the volume icon. (see screenshot). I uninstalled the original version that came with the ISO and installed your latest pet, but still does the same thing. It behaves like it should when I run the live cd. This happened after I did frugal install.
Attachments
My_DT.jpg
(168.25 KiB) Downloaded 1104 times

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#43 Post by Pizzasgood »

That sounds related to the problem magerlab posted about in the previous page. When I wrote this I didn't think of the possibility of the tray being on the top, so I'm pretty sure that that's at least part of the problem. It's trying to render it above the taskbar, which puts it off the screen, and then depending on the window manager it could wind up in strange places.

I'll try to work on it later this week.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

mill0001
Posts: 358
Joined: Thu 01 Feb 2007, 16:30
Location: "People's Republik of Kalifornia"

#44 Post by mill0001 »

Hi Pizza,
No big rush. I have a full install of 4.21 that I'm using as my main op sys. I just hate it when lil things don't work properly and I don't know how to fix it. Thanks for your attention. Lee on the Left Coast. (People's Soviet Socialist Republic of California, Amerika)

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#45 Post by WarMocK »

Hey Pizzasgood,
being a "victim" of a CM6501 audio chip, I am unable to use the current volume control on Puppy, so I gave retrovol a try - and it partially worked. :D
The problem is: the usb audio I need to select for volume control is listed as "Speaker1" in both alsamixer and retrovol. I know that I can chose what audio channel can be controlled over the desktop slider, but I have no idea which one to chose, as the dropdown list offers TWO "Speaker" channels (but no Speaker1), and none of them seem to work (I already tested them both). Do you have any idea what else I could try? Or is there probably a way to alter retrovol to provide better usb audio support? It would be nice if I didn't have to open retrovol's volume control window to change the volume level but could use the slider instead.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#46 Post by Pizzasgood »

WarMocK wrote:Hey Pizzasgood,
being a "victim" of a CM6501 audio chip, I am unable to use the current volume control on Puppy, so I gave retrovol a try - and it partially worked. :D
The problem is: the usb audio I need to select for volume control is listed as "Speaker1" in both alsamixer and retrovol. I know that I can chose what audio channel can be controlled over the desktop slider, but I have no idea which one to chose, as the dropdown list offers TWO "Speaker" channels (but no Speaker1), and none of them seem to work (I already tested them both). Do you have any idea what else I could try? Or is there probably a way to alter retrovol to provide better usb audio support? It would be nice if I didn't have to open retrovol's volume control window to change the volume level but could use the slider instead.
Okay, I think I might know what's wrong. I'm guessing that that particular control doesn't use integer as the datatype. Right now I decide which controls to put in the dropdown by just grabbing all integer controls.

Could you post the output of the following command for me?

Code: Select all

amixer contents
Then I can see what datatype it uses and adjust my code appropriately. Probably what I'll need to do is specifically filter out booleans and enumerated, and include everything else.




I'm going to try to get the work I've done today packaged up by tonight. So far I've fixed the bug with not restarting after using Exit, added an optional (enabled by default) menu that appears on right-click on the tray icon, moved the tray-related options in the configuration window to their own tab, and hopefully fixed the problems people were having with using trays at the top of their screens.

I will hopefully begin addressing the balance stuff and adjusting the available controls for the tray mixer this weekend if I have time.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#47 Post by WarMocK »

One tar-gzipped amixer output, coming up. :D
Attachments
amixeroutput.tar.gz
(553 Bytes) Downloaded 756 times

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#48 Post by Pizzasgood »

Version 0.5 is uploaded. It does the things I mentioned in the above post.

One slight (inconsequential) annoyance: I wrote some code to detect whether it's in a taskbar at the top of the screen or one at the bottom of the screen, so that it can reverse the order of the popup menu when you rightclick the icon. That way no matter where you place it, the item under the mouse at first will be the one to open the main window, with the exit option the furthest away. This is more convenient and safer (harder to accidentally close it). The problem is that when retrovol first starts, there isn't a taskbar yet, so it thinks it's on the top. Then JWM fires up, and if the taskbar is at the bottom, Retrovol doesn't know to update its menu.

This doesn't hurt anything. It all works fine still. But don't get too used to the menu layout that it will give you for now, because I will correct the above behavior in the next version. (Unless you use a taskbar at the top, in which case you can feel free to start getting used to it immediately).

One other small thing people may notice: Until now, I had it showing the popup slider three pixels above the icon, to account for the border of the taskbar. But I can't really know in advance with certainty what that will be. I don't like hardcoded guesses like that, so I removed the offset. In the next version I will add a configuration option to set it, and maybe a feature to guess it (I already have code that calculates the size of the border on the opposite edge - between the icon and the edge of the screen - so I could just assume both edges are the same thickness).


Another thing I intend to do in one of the next two versions is save the window position and dimensions. Those were requested features and I agree that it's annoying to have it pop up way over in the middle all the time.

I also still need to make the PID handling more robust. It works fine normally, but there is still a potential issue if it crashes or is killed. Well, fixing normal kills is easy - just add a signal handler for SIGTERM so that it exits cleanly, which is a good idea anyway :roll:. But if it somehow crashes or gets hit by kill -9, and if it leaves a zombie process (which appears to be a problem with JWM, not Retrovol, though I need to do more testing before I can say for sure), then it won't start again until the old PID file is removed. Should be pretty easy to fix. I might tackle that this weekend as a warmup before the balance stuff.

WarMocK wrote:One tar-gzipped amixer output, coming up. :D
Thanks. It turns out those controls do use ints. So they should work. Whether they are the right ones, I have no idea.

When you look at it in the main window, is there a "Speaker" entry along with the "Speaker1" entry?

What's happening is that there are two controls named "Speaker Playback Volume", but one is at "index=1" and appears to be an 8-channel device with numbers that range from 0-197, whereas the first one is (I assume) at index 0, and your file shows it as being a 2-channel device with a value range from 0-8065.

Off the top of my head, I believe the main-window code appends the index number to the end of the name and strips off some of the extra fluff (all the "Volume" strings, for example), thus the "Speaker1" entry despite there being no "Speaker1" in the amixer output. The tray slider dropdown, on the other hand, uses the raw unaltered names. I'm guessing that the second entry in the dropdown would be the one you want, since I'm assuming Speaker1 corresponds to the one with index=1, which has a larger numid than the one without, so it should probably show up after it.


When I work on it this weekend I'll take a look at the code used in those two areas (I'll be looking at it anyway for the balance support) and see if I can see why one would work and not the other.

One thing that would help a little is if you turn down the volume in the one that works (verifying that it is in fact working by playing some music or whatever), run that command, and then turn the volume up and do it again. Then post both copies. Then do the same thing using the dropdown set to the first Speaker entry, then to the second one.

Off the top of my head, I'm guessing that maybe the dropdown is not handling the index properly and seeing the first "Speaker" control twice instead of seeing two separate ones.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#49 Post by WarMocK »

Pizzasgood, that's what I meant when I said I need to select "Speaker1" in both alsamixer and retrovol. I should have added "instead of Speaker" to the sentence to clearly point that out, sorry for that.
And like I said, I tested both "Speaker" entries for the desktop slider, but none of them worked (I tested the second entry of the listbox first because I assumed it was Speaker1 and that the index number just was cut off by the program). I'll give it a try later and generate some output for both speaker devices with different sound volumes and post them here. See you later.

EDIT: here you go!
The 2 at the end of the filename indicates that both speaker sliders were throttled down, while the file without the 2 is the output with only speaker1 either been throttled (low) or at maximum (full).
Attachments
sliders.png
(26.78 KiB) Downloaded 1591 times
amixeroutput.tar.gz
(710 Bytes) Downloaded 786 times

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#50 Post by Pizzasgood »

Okay, I see what's happening. That part of the code (along with the code that loads settings from a file) is based solely on the name of the device, under the erroneous assumption that they are unique. I'll have to adjust it to allow an index to be saved/loaded along with the name, when needed (else default to 0).

Thanks for bringing that to my attention.



In other news, among other things I implemented balance today. You hold shift to change the left channel, and hold ctrl to change the right channel. Scrolling and arrow keys (and pg-up/down) will maintain the difference between the two settings when neither shift nor ctrl is held. The click/drag method, however, will reset them to be equal if you don't hold one of those down. I might change it to have the click and drag set the louder of the two channels and reposition the lesser to maintain the gap. (The current behavior was not intentional, just the default that happened due to how I implemented everything.)

I'm not going to package it up until I get the index stuff incorporated, along with the position memory. I might have time for those tomorrow, or I might not. As always, the current progress is in the SVN repo for the impatient ;)
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#51 Post by Pizzasgood »

Okay, version 0.6 uploaded (see first post).

New features:
  • Balance control as described above.
  • It now automatically remembers the window position and dimensions - not perfectly, because it isn't able to determine the added size that window decorations adds. (I just thought of an idea that might avoid that issue at least in some cases, so I'll try it before the next version.)
  • Ability to define the offset between the slider and the tray icon (otherwise it tries to guess)
Fixes, improvements:
  • Added signal handlers to exit cleanly on SIGINT and SIGTERM.
  • Added rudimentary zombie detection (which should only happen if the program is sent SIGKILL (kill -9) and it doesn't exit correctly).
  • The menu is ordered correctly, and automatically reverses if the taskbar is moved from the top of the screen to the bottom (or vice-versa) without restarting Retrovol.
  • Determination of whether it is at the top or bottom works more accurately.
  • Fixed bug with incorrect slider offset when at top of screen.
  • Changed code to rely on the numid of controls instead of name, fixing the bug with duplicate names.
  • Fixed bug when the tray program exits and restarts while retrovol is running.
Note: This new version uses numid to identify slider controls, so if you had already told an older version of Retrovol which sliders to display and use for the tray, you will need to adjust your .retrovolrc file (or just delete it if you don't mind losing your preferences). The simplest solution that preserves other settings is to open the file in a text editor and remove the "tray_slider_control" and "sliders:" sections. If you want to keep the same slider layout, however, you can manually upgrade the file by replacing the name of each slider with that slider's numid (run "amixer controls" for a list). Note that unlike with the names, the numid should not be quoted. Also, since a numid isn't very descriptive, you might want to place a comment after it explaining which control it is for (e.g. 37 #Master Volume Control).

The new version no longer specifically requires tabs to be used in the "sliders:" section - it will work with any number of spaces and tabs there. (All other sections must still be completely left-justified, however.)


I believe the fix for handling when the tray itself exits should fix the problem that Barry mentioned on his blog, along with the JWM issue when you kill and relaunch JWM.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#52 Post by 01micko »

Hi Pizzasgood

I really like retrovol, especially the alsa compliance, couple of clicks and I've got my sound configured.

A couple of issues, btw I just compiled retrovol-6 in Lupu, --prefix=/usr.

Now I made a pet and installed. On an X-restart retrovol appears in the JWM tray with the wrong background, fine, we haven't set it, but we haven't called retrovol either. It's not in ~/.xinitrc. I am a bit puzzled why it starts.

Second issue, if you put the entry on the first page of this thread in ~/.xinitrc and restart X the volume icon appears with the correct background but the mixer window appears.

If I could find how retrovol starts in my first instance I think I'd be there with solving my issue.

Cheers
Puppy Linux Blog - contact me for access

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#53 Post by Pizzasgood »

I'm guessing that maybe you have a script in /root/Startup/ that is launching it. If it's already launched once, the second time it's attempted to be launched would pop up the window instead of only starting the tray icon, even if the -hide option is used.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#54 Post by 01micko »

Aha! Found it!

It snuck it's way into /usr/sbin/delayedrun, but no background argument! I will comment that and leave it in ~/.xinitrc

Thanks!

..no, I might leave it there and add the bg argument and read the JWM colors file.

Cheers
Puppy Linux Blog - contact me for access

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#55 Post by WarMocK »

Hey Pizzasgood,
I just installed the new dotpet, but for some reason it won't work. I threw out my old rc file to make sure it works, but I still can't select the speaker1 device listed in the main window. And when I try to set the output for the tray slider manually (either the numid or the name I got in the main control window), retrovol shows the incorrect sound level for a second, then goes on mute and resets itself to the CD output.
Any idea what I'm doing wrong here?

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#56 Post by Pizzasgood »

Sorry for the long delay. I was busy wrapping up college and getting gradumutated. Now I'm chilling at my graandparents' house until I can get my car working and legal so I can ride off into the sunset. (Well, actually it would be the sunrise, because I'm headed east, but that doesn't sound as cool.)

Anyways, yeah, it looks like the code I wrote doesn't quite work. I ran out of time and was rushing, and forgot to test whether the new dropdown code actually works (it doesn't). Sorry about that.

I'll go see what the problem is.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#57 Post by Pizzasgood »

Version 0.7 uploaded. The only change is that the dropdown to select the slider controlled by the tray now works.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#58 Post by disciple »

Does anyone else have trouble getting it to remember the window location?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#59 Post by Pizzasgood »

Could you elaborate? I know it isn't exact but it should be close.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#60 Post by disciple »

No, this is a separate issue...
I see now. It comes down to the difference between using "quit" or the window manager close button, and right-clicking on the tray icon (with the right click menu disabled).

Code: Select all

diff -ur retrovol-0.7/src/main.cpp retrovol-0.7a/src/main.cpp
--- retrovol-0.7/src/main.cpp	2010-05-17 08:13:32.000000000 +1200
+++ retrovol-0.7a/src/main.cpp	2010-05-29 10:43:31.528818169 +1200
@@ -115,7 +115,7 @@
 				gtk_menu_popup(GTK_MENU(settings.tray_icon_menu), NULL, NULL, NULL, NULL, event->button, event->time);
 			} else {
 				if (GTK_WIDGET_VISIBLE(settings.main_window)){
-					gtk_widget_hide_all(settings.main_window);
+					gtk_widget_hide(settings.main_window);
 				} else {
 					gtk_widget_show_all(settings.main_window);
 				}
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply