User Tag List

Results 1 to 5 of 5

Thread: Sound Looping

  1. #1
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sound Looping

    Hi,

    Recently I've been working on a game that requires a continuous loop of sound throughout the entire game. However it would appear that I've hit a road bump of some sort. My game does not run on one frame, but many frames. So I am in need of way to play a sound through the whole game without being stopped by changing frames. Any ideas?

    -Thanks, Variant

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sound Looping

    How are you doing it just now? It sounds like you could do this by checking the "Play samples over frames" box of your application properties, then using the event "If [sound] is not playing on channel X -> Loop sample [sound] on channel X".

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Sound Looping

    Another way you can do this is to actually code your sounds. By adjusting the position of the channel, you can set a sound to play from any part of the track. For example, if your code looked like this:


    Start of Frame:
    Play Sample "Music.OGG" on Channel 1
    Set position of Channel 1 to Global Variable A
    Lock Channel 1


    Position of Channel 1 > Duration of Channel 1
    Set position of Channel 1 to 0


    End of Frame:
    Set Global Variable A to Position of Channel 1




    positions / durations of sounds will not count the # of frames, but rather return the number of milliseconds (1000 per second). So if it says position = 5029, that means 5.029 seconds

  4. #4
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sound Looping

    Quote Originally Posted by DavidN
    How are you doing it just now? It sounds like you could do this by checking the "Play samples over frames" box of your application properties, then using the event "If [sound] is not playing on channel X -> Loop sample [sound] on channel X".
    That one works easier.

    -Thanks, Variant

  5. #5
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sound Looping

    Quote Originally Posted by Pixelthief
    Another way you can do this is to actually code your sounds. By adjusting the position of the channel, you can set a sound to play from any part of the track. For example, if your code looked like this:


    Start of Frame:
    Play Sample "Music.OGG" on Channel 1
    Set position of Channel 1 to Global Variable A
    Lock Channel 1


    Position of Channel 1 > Duration of Channel 1
    Set position of Channel 1 to 0


    End of Frame:
    Set Global Variable A to Position of Channel 1




    positions / durations of sounds will not count the # of frames, but rather return the number of milliseconds (1000 per second). So if it says position = 5029, that means 5.029 seconds
    Thanks for this info, I could use it it in another game I'm creating.

    -Variant

Similar Threads

  1. How do you play default ios sound, eg the notification sound.
    By assentec in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 14th July 2013, 06:33 AM
  2. Weird Sound Card Beeping - Sound Player Extension
    By xmetalxthrasherx in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 12th July 2011, 06:09 AM
  3. Sound array? alternative to random sound?
    By gen in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 28th April 2011, 06:53 AM
  4. [Extension Request] Sound to text to Sound Convert
    By LB in forum Extension Development
    Replies: 43
    Last Post: 1st December 2008, 12:58 AM
  5. Play sound IMMEDIATELY after other sound finishes
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 1st September 2007, 12:18 AM

Posting Permissions

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