Home AMX User Forum NetLinx Studio

Levels first time

adysadys Posts: 395
Hi all

I read a lot and made my first levels use.
I just wanted get ok on my code to see that I am not doing ugly things that will not work :)


I have a music modlue that controls volume
I have a virtual device vdvMusicLevels = 33005:1:5 inside the music module (as parameter)


then every time I get a volume change I send level update to the vdvMusicLevels:

send_level vdvMusicLevels, ELECTRIC_JACUZZI_OUTPUT, volume

( is that enough or I need to declare the levels before sending them? )


then in my listeners side (inside other module) , I create a level in start section:

create_level vdvMusicLevels, ELECTRIC_JACUZZI_OUTPUT, m_volumeToUpdate


is this is the only thing I need to do to get m_volumeToUpdate to be updated?

thanks a lot

Ady

update:

I made some test code to check it, and its not working....

I see with the debugger that I send the level, but my "m_volumeToUpdate" is not updated
other string message are working good between those 2 module.

m_volumeToUpdate is declared as integer, and the value that sent to the level is also integer.
I made m_volumeToUpdate to be VOLATILE, still not working...

I am stuck, thanks for any help



update 2:

This solved the problem

SET_VIRTUAL_LEVEL_COUNT(vdvMusicLevels, 24)

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Yeah, you have to do that when a virtual device has more than 8 levels defined. I was scratching my head, because your examples were fine, but then, I didn't know the value of the actual level because you used a constant alias.
Sign In or Register to comment.