MVolume How to Get the Valor?

Started by Amiten, July 17, 2013, 09:32:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Amiten

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
AMIGA is a Style of Life

Amiten

AMIGA is a Style of Life

SamuraiCrow

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.

Amiten

 :-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
AMIGA is a Style of Life

Amiten

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??
AMIGA is a Style of Life

Hungry Horace

Amcaf extension has some extra sound commands, maybe look through the online manual for that?
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff