Ultimate Amiga

Network Boards => AMOS Programming Environment => AMOS Factory => AMOS BASIC => Topic started by: Amiten on July 17, 2013, 09:32:00 AM

Title: MVolume How to Get the Valor?
Post by: Amiten on July 17, 2013, 09:32:00 AM
Hello,

I want to know when the system have no sound by the inbuilt Mvolume command in amos.

any idea how to know when the system is mute or volume 0  and assign to a variable?

i try with this but get an error


m=Mvolume
do
if m=0 then print "no sound"
loop

Thanks
Title: Re: MVolume How to Get the Valor?
Post by: Amiten on July 17, 2013, 11:08:51 PM
Any Help??
Title: Re: MVolume How to Get the Valor?
Post by: SamuraiCrow on July 18, 2013, 09:22:02 AM
The Amiga has 4 volume controls; one per voice.  To read the current amplitude of a voice you can use the vumeter function.  You cannot use Mvolume as a variable though because it is a command.  It merely sets the music volume.
Title: Re: MVolume How to Get the Valor?
Post by: Amiten on July 18, 2013, 10:40:27 AM
 :-X :-X :-X :-X :-X :-X

   V0=Vumeter(0)
   V1=Vumeter(1)
   V2=Vumeter(2)
   V3=Vumeter(3)

thanks samuraiCrow you are my hero  ;D ;D
Title: Re: MVolume How to Get the Valor?
Post by: Amiten on July 18, 2013, 01:42:06 PM
Vumeter only gets the volume from a .med .mod .abk music file but no for the sound samples played by the sam play command  :(

if we do that
sam loop on
sam play 1
Do
V0=Vumeter(0)
locate 10,10:print V0
loop

the valor of V0 always get "0" :(

so any idea how to get the volume valor on a single sound sample??
Title: Re: MVolume How to Get the Valor?
Post by: Hungry Horace on July 18, 2013, 04:35:35 PM
Amcaf extension has some extra sound commands, maybe look through the online manual for that?