Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    34

    URGENT HELP!!! How can i get the value of the audio channel?

    Hy...
    I have a verry strong problem. I have loaded some audio files in some channels (CHANNEL_USER1, CHANNEL_USER2, etc ...). What is the script command to get or find the channel number that is current playing?
    Urgent please....
    This is my project exemple:
    I load a file to Channel_User1 and a File to Channel_user2. After the page is started i push a button (play) that play Channel_User1. When i press the "next button" it's stop Channel_User1 and start to play Channel_User2. And so on...
    How can i do this?
    PLS Help Me Guys!!!

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Channels have numbers (0 to 6), check help file.
    You can use an Audio action, for example Audio.GetCurrentPos(Channel) in a for loop. If there is an error (like the channel is not loaded for example), instead of getting a "proper" result, you will get -1 as the value. You can check for which channel that value was NOT -1 and that will give you the number of the channel currently playing.

    Good luck
    Yossi

  3. #3
    Join Date
    Oct 2007
    Posts
    34

    be more explicit...

    I didn't understand much thing of your explication. Give me a script command or something to view it with my eyes otherwise i do not understand anything.

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Audio channels are numbered.
    From the help file:
    CHANNEL_BACKGROUND 5 Background audio channel.

    CHANNEL_EFFECTS 0 Effects channel (used for mouse over, down, and click sounds).

    CHANNEL_NARRATION 6 Narration channel (used for voice overs).

    CHANNEL_USER1 1 User channel 1.

    CHANNEL_USER2 2 User channel 2.

    CHANNEL_USER3 3 User channel 3.

    CHANNEL_USER4 4 User channel 4.

    So, you can use the following in any event you want to use to check your audio status (buttons click, Page onShow etc...)

    Code:
    --checking channels
    for i = 1, 4 do
        position = Audio.GetCurrentPos(i); -- check if channel is running
        --if no sound loaded in channel i , position will be equal to -1   
        if position ~= -1then
            break; --when running channel is found, break from the loop
        end
    end
    Now you know that i is the number of the audio channel and can use that to your advantage.

    Good luck

    Yossi

Similar Threads

  1. Build failure because of errors
    By Ed Stanley in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 02-07-2006, 03:51 PM
  2. HELP: Trying to create a bookmark for audio
    By Ren in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 09-12-2005, 05:20 AM
  3. Help: Trying to create a bookmark for audio
    By Ren in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-09-2005, 01:43 PM
  4. Example of dynamic audio channel control a.k.a. "Interactive Quadraphonic Sound"
    By Corey in forum AutoPlay Media Studio 5.0 Examples
    Replies: 8
    Last Post: 02-13-2005, 01:49 AM
  5. AMS5 Autorun prevents flash sound - would Audio Stop - Channel All work?
    By David Delaney in forum AutoPlay Media Studio 5.0
    Replies: 13
    Last Post: 10-18-2004, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts