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

#31 Post by Pizzasgood »

Well that's not good. The method I used to position it is a bit of a hack, so I was planning to eventually change that anyway. I'll check on that next time I work on it. Though I probably won't be working on Retrovol for the next couple weeks as I focus on getting CheesyRamHog to the point where I can use it as my main OS. (I just finished automating the first half of the compile-from-source process this morning and am testing that in the background right now.)

For the record, that positioning problem and the need for balance control are the next items on my list for when I come back to working on this, unless any serious bugs are noticed.


I prefer cold pizza for breakfast, and sometimes for lunch if it's an early lunch. But I usually prefer it hot the rest of the time, especially for supper.
[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

#32 Post by disciple »

If you're looking at positioning stuff again, it would also be nice if there was an option to make the mixer come up in the corner of the screen instead of the centre, or alternatively it could remember its location instead of always moving back to the centre :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#33 Post by BarryK »

I have to stay with 0.2 as 0.4 does not work properly for me.

I have the icon in the tray, which is fine.

There is a menu entry in the Multimedia menu to run the mixer. If I do that (or type "retrovol" in a terminal), then I see two menu entries "Quit" and "Exit" -- I chose the latter, which killed the tray icon as well.

I then tried to rerun the mixer, by typing "retrovol" in a terminal, but it won't start -- nothing happens, just returns to the prompt.

0.2 works fine, except for that little taskbar problem.

Can you separate the tray icon and the mixer to separate applications? That might make things much cleaner.
[url]https://bkhome.org/news/[/url]

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

#34 Post by Pizzasgood »

Seems to be that instead of properly closing it sometimes becomes a zombie. Then the PID check when you try to rerun it thinks it's still running, so it sends the popup signal and exits.

The quick fix is to remove the leftover PID file (/var/run/retrovol.pid) before trying to relaunch it.

Taking a quick look at the code, I'm not sure how this situation can even happen, because it should remove the PID file before it tries to exit, and it shouldn't be able to become a zombie until after it tries to exit. I suspect maybe the code handling the tray icon might not be being told to close properly, causing the program to try exiting before it has a chance to finish cleaning up.

I'm not a big fan of the idea of breaking it apart, so I'll try to fix the actual problem first. I'll also learn how to access the process list from C in order to make the PID check more robust so that it can survive the times when there are zombie uprisings. (It can already handle stale files by virtue of that sending the popup signal via kill() returns an error code when the process does not exist. But when the process is a zombie it does still exists and receives signals happily.)
[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
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#35 Post by puppyluvr »

Hello,
I like it.. :D
It is configurable, easy, and slick...
And it scrolls... 8)
Very nice..
I`ll be getting a lot of use from this pet..
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#36 Post by BarryK »

Pizzasgood,
I don't want the mixer to have an "Exit" menu entry that kills the tray icon. People will see two entries in the mixer "Quit" and "Exit" and that will cause confusion, then they will try the latter and be surprised when the tray icon disappears (as I was).

You are thinking in terms of the mixer only being launched from the tray icon perhaps, while I also want it to launch separately from the main Multimedia menu -- in the latter case, exiting the mixer should definitely not have any affect on the tray icon.
[url]https://bkhome.org/news/[/url]

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

#37 Post by Pizzasgood »

Good point. I think I'll change the right-click behavior to show a menu instead of immediately bringing up the main window. That would also leave room for having an option to have it launch a different program as the main one while still allowing access to the configuration GUI.

That way I could justify removing the exit option from the main window entirely. Exiting the tray icon would be done from the tray icon itself. More obvious => less room for Murphy's Law to take effect.
[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

#38 Post by disciple »

Just my 2 cents: right-click to bring up the mixer is the best feature. Maybe it could be configurable, or a command-line option for keen people?

The other option would be to relabel "Exit" to make the behaviour clear. This wouldn't let people use another mixer... but do they really want to?
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

#39 Post by Pizzasgood »

So I'm clear, I meant that the menu it brings up would have an entry to launch the main window. So you could still access it from the icon. It would just be either two clicks, or a down-click + drag-to-entry + release, instead of the current immediate down-click-only.

If there is demand for no menu even after the clarification, I will add a configuration option.

I'll probably add a separate tab especially for the tray-related options like that (and of course move the applicable ones into that tab). There's already more than I'd like in the Main tab.
[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

#40 Post by disciple »

It would just be either two clicks, or a down-click + drag-to-entry + release, instead of the current immediate down-click-only
Yes, I did realise what you meant, but two clicks is so much less efficient than one :)
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

#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]

Post Reply