Xojo Conferences
XDCMay2019MiamiUSA

[MBS] GetVolumeMBS and SetVolumeMBS (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Stuffit comeing back...
Next thread: [MBS] 5.0pr3


Re: [MBS] MIDI Destinations and External Devices   -   Ron Benditt
  [MBS] GetVolumeMBS and SetVolumeMBS   -  
   Re: [MBS] GetVolumeMBS and SetVolumeMBS   -   Christian Schmitz
    Re: [MBS] GetVolumeMBS and SetVolumeMBS   -   Ron Benditt
     Re: [MBS] GetVolumeMBS and SetVolumeMBS   -   Massimo Valle
      Re: [MBS] GetVolumeMBS and SetVolumeMBS   -   Christian Schmitz
   Re: [MBS] GetVolumeMBS and SetVolumeMBS   -   Christian Schmitz

[MBS] GetVolumeMBS and SetVolumeMBS
Date: 05.01.05 11:19 (Wed, 05 Jan 2005 10:19:54)
From:
I've been playing with GetVolumeMBS and SetVolumeMBS to attempt to get and set the computer system's audio
volume. Works great on OS X, but I don't get anything happening on Windows. I've tried running the example
file called GetVolume on three different Windows computers (2 WinXP systems and one Win2000 system) and the
volume shows up as -1 in all cases and moving the slider doesn't do anything. Are these methods broken, or
do I need to add something somewhere to get it working?

Thanks,

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GetVolumeMBS and SetVolumeMBS
Date: 07.01.05 20:11 (Fri, 7 Jan 2005 20:11:22 +0100)
From: Christian Schmitz
<<email address removed>> wrote:

> I've been playing with GetVolumeMBS and SetVolumeMBS to attempt to get and
> set the computer system's audio volume. Works great on OS X, but I don't
> get anything happening on Windows. I've tried running the example file
> called GetVolume on three different Windows computers (2 WinXP systems and
> one Win2000 system) and the volume shows up as -1 in all cases and moving
> the slider doesn't do anything. Are these methods broken, or do I need to
> add something somewhere to get it working?

It does not support Windows.
If you find a way to do it in C or Visual Basic I could change the
plugin...

Mfg
Christian

Re: [MBS] GetVolumeMBS and SetVolumeMBS
Date: 08.01.05 19:58 (Sat, 8 Jan 2005 13:58:58 -0500)
From: Ron Benditt
Ugh! I was afraid of that. I think Aaron's Window's Functionality
Suite has something in it that is supposed to do this as well. I tried
it briefly, but it didn't seem to work, neither. I guess I'll revisit
it, and if I still can't get it to work, I'll have to dig deeper.
Thanks, Christian.

>> I've been playing with GetVolumeMBS and SetVolumeMBS to attempt to
>> get and
>> set the computer system's audio volume. Works great on OS X, but I
>> don't
>> get anything happening on Windows. I've tried running the example
>> file
>> called GetVolume on three different Windows computers (2 WinXP
>> systems and
>> one Win2000 system) and the volume shows up as -1 in all cases and
>> moving
>> the slider doesn't do anything. Are these methods broken, or do I
>> need to
>> add something somewhere to get it working?
>
> It does not support Windows.
> If you find a way to do it in C or Visual Basic I could change the
> plugin...

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GetVolumeMBS and SetVolumeMBS
Date: 08.01.05 22:21 (Sat, 08 Jan 2005 22:21:54 +0100)
From: Massimo Valle
on 8-01-2005 19:58, Ron Benditt wrote:

> Ugh! I was afraid of that. I think Aaron's Window's Functionality
> Suite has something in it that is supposed to do this as well. I tried
> it briefly, but it didn't seem to work, neither. I guess I'll revisit
> it, and if I still can't get it to work, I'll have to dig deeper.
> Thanks, Christian.
>

Ron, I suggest you avoid using GetVolumeMBS and SetVolumeMBS functions
because are not reliable. The MBS functions works properly but the Carbon
functions are broken if used in Mac OS X. No problems in MacOS 9.
If you try to set the volume using SetVolumeMBS you get different result
depending on the target hardware.
The only use you can do of these functions is using GetVolume to obtain the
current level and SetVolume to restore the same level. Do not try to set
percentual values with SetVolume. Setting it to 256 could result in values
from 80% to 100% of the maximum level, depending on the Mac model and audio
device used.
In past I fight a lot with these functions trying to understand the (non
linear) function that describe the volume levels. My experience was that
there is not a common function but an hardware lookup table different for
every audio device.
Resuming, you can safely use these functions for MacOS 9 but you must use
CoreAudio for Mac OS X. With CoreAudio you can properly set and get the
volume level in percentual and absolute mode.

Massimo Valle

------------------------------------------
Macron software
Software utilities for Macintosh

General info : <email address removed>
Support email: <email address removed>

http://www.macronsoft.com/
------------------------------------------

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GetVolumeMBS and SetVolumeMBS
Date: 09.01.05 11:30 (Sun, 9 Jan 2005 11:30:35 +0100)
From: Christian Schmitz
Massimo Valle <<email address removed>> wrote:

> Resuming, you can safely use these functions for MacOS 9 but you must use
> CoreAudio for Mac OS X.

If you tell me how to best set it on Mac OS X I'd love to change the
plugin to offer one method for all platforms.
(includeing the Windows side)

Mfg
Christian

Re: [MBS] GetVolumeMBS and SetVolumeMBS
Date: 09.01.05 13:25 (Sun, 9 Jan 2005 13:25:31 +0100)
From: Christian Schmitz
Massimo Valle <<email address removed>> wrote:

> Enclosed you will find an example on how to set/get the volume using
> CoreAudio on Mac OS X. It can control left and right volume separately
> and/or master volume for devices not supporting separate controls as well
> for mono devices.

Ok. I made SetSoundVolumeMBS and GetSoundVolumeMBS for 5.0pr5 to replace
the old function.
Value is in percent from 0 to 1.0.

Mfg
Christian