Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with soundchannels

Status
Not open for further replies.

2233

Technical User
Sep 30, 2002
4
DE
Hi! this programming plays a sound file member in channels 1,2,or 3 depending on a or b.
a= member of a list(value)
b= menber of a list(value)

Depending if a or b are on position 1,2 or 3 in the list a sound file must be plaid in channel 1, 2 or 3. For this I have to stop the sound when they are not in that position.

Playing this programing my sound files starts and stop all the time.
The problem is on the lines that are like a<>1,a<>2,a<>3, and also the same with b.

How could I do this without stoping or making lower the channel?
Thanks

on play1 linList
if a=1 then
sound(1).queue([#member: member(&quot;VI1&quot;), #preloadTime: 4000])
sound(1).play()
else if a<>1 then
sound(1).stop()
end if

if a=2 then
sound(2).queue([#member: member(&quot;VI1&quot;), #preloadTime: 4000])
sound(2).play()
else if a<>2 then
sound(2).stop()
end if

if a=3 then
sound(3).queue([#member: member(&quot;VI1&quot;), #preloadTime: 4000])
sound(3).play()
else if a<>3 then
sound(3).stop()
end if
end


on play2 linList
if b=1 then
sound(1).queue([#member: member(&quot;VI2&quot;), #preloadTime: 4000])
sound(1).play()
else if b<>1 then
sound(1).stop()
end if

if b=2 then
sound(2).queue([#member: member(&quot;VI2&quot;), #preloadTime: 4000])
sound(2).play()
else if b<>2 then
sound(2).stop()
end if

if b=3 then
sound(3).queue([#member: member(&quot;VI2&quot;), #preloadTime: 4000])
sound(3).play()
else if b<>3 then
sound(3).stop()
end if
end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top