Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 11th, 2024, 4:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: PlaySound channel seems to be stuck on default
PostPosted: April 17th, 2006, 1:03 pm 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
I'm trying to play several sound files from the harddrive simultaneously and control the volume of each sound independently. But no matter how I play around with the script it seems to play the sounds using "auto" default channel.

Example:

I want to play the file "01-ins1.mp3" on channel 5.

I use the following script to give the audio file the alias name of "AudioIns1":

AudioIns1 = SYSTEM_PUBLICATION_DIR + "\\01-ins1.mp3"

I use the following script (I tried with and without spaces) to play the audio file on channel 5:

PlaySound( AudioIns1, preload=true, times=1, volume=50, start=0, finish=-1, fadeIn=0, fadeOut=0, stop=false, channel=5, wait=false)

And I also tried (with and without spaces)...

PlaySound( AudioIns1, true, 1, 50, 0, -1, 0, 0, false, 5, false)

The audio file plays okay, but all of the other PlaySound parameters seem to be stuck on default. How do I get the channel parameter to function properly?

I am using Opus Pro 5.5. Thank you for any help. :lol:


Top
 Profile  
 
 Post subject:
PostPosted: April 18th, 2006, 2:27 pm 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
Here is an example of the problem.

Note: after you publish this Opus file as a standalone program, make sure to copy the chimes.wav file to the same directory that has the .exe file.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: PlaySound channel 5 problem is solved.
PostPosted: April 18th, 2006, 5:32 pm 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
Problem solved.

Brendon from Digital Workshop told me how to fix it. First of all, in scripts, the channels are 0-7 instead of 1-8. Secondly, the "stop" parameter is where the "channel" should be. So, instead of

PlaySound( AudioIns1, true, 1, 50, 0, -1, 0, 0, false, 5, false)

the correct script is

PlaySound( AudioIns1, true, 1, 50, 0, -1, 0, 0, 4, 4, false)

And now the script will play AudioIns1 on channel 5.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group