Author Topic: Request: a command to change sound volume  (Read 342 times)

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Request: a command to change sound volume
« on: November 26, 2018, 02:58:58 PM »
This is a help request to current Amiga developers. Unluckily I do not have the skill to do this by myself, but I guess many of you are. I'd need a simple utility in C to change the sound volume with AHI. A quick implementation of it would just change the 'main' volume, from 0 to 100%, for all the available music and audio units. Would anyone volounteer? Requisites: being open source and straight-to-compile on any Amiganoid system and platform.

My intermediate goal is just having the cance to open a shell window and give a command like

ahivolume 0 --> to set the overall sound volume to null
ahivolume 100 --> to set the overall sound volume to max

and obviously any intermediate value in the range 0-100, independently from the physical device used for sound (it shall work with any audio driver / audio mode).

Is this feasible? Or are ther technical problems making it a complete mess? Thank you.



The final (longer term) goal will be, at least on Icaros Desktop, writing a simple GUI/frontend in lua with a slider, a mute and a setting button, but I should be able to do this by myself.

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #1 on: November 26, 2018, 03:42:37 PM »
I've just realized that it should also show the current volume values, if called without any parameter...

cavemann

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Request: a command to change sound volume
« Reply #2 on: November 26, 2018, 11:10:12 PM »
There is an Arexx program in Aminet called mmvolume that controls volume. But it doesn't seem to worik on AROS. But perhaps something similar might be helpful.
 
« Last Edit: November 26, 2018, 11:18:47 PM by cavemann »

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #3 on: November 27, 2018, 06:33:34 AM »
There is an Arexx program in Aminet called mmvolume that controls volume. But it doesn't seem to worik on AROS. But perhaps something similar might be helpful.
AROS and Arexx do not sound good together... :-(
That's why I've been asking for a command in C. By the way, I was just thinking about you writing it. :-)

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #4 on: November 27, 2018, 01:36:57 PM »
There is an Arexx program in Aminet called mmvolume that controls volume. But it doesn't seem to worik on AROS. But perhaps something similar might be helpful.
Tested it right now on Icaros Desktop and, as you told me, it does not work. I get this output from RX command:
RX Mute
5 *-* MASTERMUTE  +++ RC=30 +++
But no change to sound volume.

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #5 on: November 27, 2018, 01:45:24 PM »
...but maybe it has to do with the fact that:
Quote
The Mixer commodity has to be running for the controls to work, though it doesn't have to be visible.
and we don't have such a commodity on AROS i386, AFAIK.


paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #6 on: November 27, 2018, 01:53:42 PM »
Would this be portable to AROS?
http://aminet.net/package/util/cdity/Mixer

Supports emu10kx, fm801, sb128, cmi8738, cs4281, Aureon 5.1 sky, M-Audio Revolution 5.1, ess1938/solo-1 chips, and A1-XE onboard sound (VIA686B) if you have the AC'97 codec chip onboard. The project and SVN are hosted at OpenAmiga.org.http://openamiga.org/?function=viewproject&projectid=62
« Last Edit: November 27, 2018, 02:31:41 PM by paolone »

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #7 on: November 28, 2018, 09:27:28 AM »
On Amigaworld.net I got an interesting link. Please have a look at this:
https://amigaworld.net/modules/newbb/viewtopic.php?topic_id=42983&start=0&post_id=819274&order=0&viewmode=flat&pid=819265&forum=2#819274
and obviously this
https://en.m.wikibooks.org/wiki/Aros/Developer/AHIDrivers
Section Other Examples -> master volume utility
I cannot compile this by myself, too much higher skill required than mine. :-(

nikos

  • Junior Member
  • **
  • Posts: 64
    • View Profile
Re: Request: a command to change sound volume
« Reply #8 on: November 28, 2018, 12:26:09 PM »
I understand what you are looking for. Would be a great thing to have for AROS.

It would be nice to see and have some stuff like online, offline, master volume controll etc. in title bar or something.

BSzili

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • My AROS, MorphOS and AmigaOS4 ports
Re: Request: a command to change sound volume
« Reply #9 on: November 28, 2018, 01:12:28 PM »
The only way I see this would be doable on AROS is to change the volume in the prefs file. Fortunately the format is public, there's an example on how to read it (CheckAHIPrefs), and the Prefs program is open source too with the rest of AHI.
I'm not very familiar with IFFParse.library, but I can give it a shot this weekend if nobody else is interested.
This is just like television, only you can see much further.

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #10 on: November 28, 2018, 02:03:29 PM »
@Nikos

I understand what you are looking for. Would be a great thing to have for AROS.

It would be nice to see and have some stuff like online, offline, master volume controll etc. in title bar or something.
You have centered the point. Either in AmiStart or in BoingIconBar or in the title bar... A gadget which would allow changing the damn sound volume on the fly is something I've been missing for too long, on AROS.

@BSzili
You would be welcome!!!!!

nikos

  • Junior Member
  • **
  • Posts: 64
    • View Profile
Re: Request: a command to change sound volume
« Reply #11 on: November 28, 2018, 02:38:02 PM »
BSzili: That would be fantastic  :)

You know a program like MPlayer got volume controll that is working with AROS.
Could not that part be made part of AROS and make some kind of volume slider.
It should be part of Wanderer. Every OS has something like this.
In Wanderer prefs, options, make some box to select or unselect volume controll in Titlebar.
At least that is what I would like to see.

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #12 on: November 28, 2018, 04:24:36 PM »
BSzili: That would be fantastic  :)

You know a program like MPlayer got volume controll that is working with AROS.
Could not that part be made part of AROS and make some kind of volume slider.
It should be part of Wanderer. Every OS has something like this.
In Wanderer prefs, options, make some box to select or unselect volume controll in Titlebar.
At least that is what I would like to see.
Even without taking pieces from Mplayer, we have the AHI preference program which can control volume. Just taking only the part which control the volume for the four units, and let it change the volume for all 4 together with a single slider, would be enough. I've even proposed a C command to do exactly the same thing, I'd have worked on a LUA GUI if necessary with the slider and the mute button alone. You are right it should be part of wanderer, however I'd prefer a separed solution so it would be usable with Magellan, Scalos, etc too.

BSzili

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • My AROS, MorphOS and AmigaOS4 ports
Re: Request: a command to change sound volume
« Reply #13 on: November 28, 2018, 05:17:27 PM »
The original request was about a cli command, which I'll try to make. If somebody else wants to create a GUI for it, they can.
« Last Edit: November 28, 2018, 05:24:02 PM by BSzili »
This is just like television, only you can see much further.

paolone

  • Junior Member
  • **
  • Posts: 68
    • View Profile
Re: Request: a command to change sound volume
« Reply #14 on: November 28, 2018, 08:49:20 PM »
The original request was about a cli command, which I'll try to make. If somebody else wants to create a GUI for it, they can.
Great!