User Tag List

Results 1 to 5 of 5

Thread: Looping music from the middle point?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Looping music from the middle point?

    Right now, I am using music in .ogg format in my game. I am wondering if there are any extensions, or codes that can play a song as a single file, and loop it in the middle of it instead of looping back to the beginning of the song? Whether its a code/extension that plays mp3/ogg/or wav files at mid point of the song, i wouldn't think it matters.

    Since I can't seem to find any other way right now, I have split the song into 2 .ogg files. One that plays the first bit once, and the middle looping point is a file of its own.
    Although it would help if there was another way around this instead of using 2 files just for a middle loop point in a game.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Looping music from the middle point?

    Use the sample action: set sample position

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Looping music from the middle point?

    Umm.... I am going to need more information than just that. Like how do I know where to set the channel position, and when? And will this effect the FPS of the game? For example, any unexpected pausing, etc?

    It appears that there isn't a trigger that checks for the current sample's position by itself. Just triggers that checks if a sample not playing, a specific sample not playing, specific channel not playing, or if the samples/channels are paused. The only thing I saw that came close was comparing a counter to whatever sample you set it to, to its duration, or current position.

    I also noticed if you have a code/trigger to set sample position in the middle, if you have the application paused (usually ctrl+p), the sample stops playing, assuming you only play the sample once. Seeing that when I set the sample to loop 0, I can't correctly set the sample position in the middle when it reaches its last duration.

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Looping music from the middle point?

    Use compare 2 general values to test the sample position.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Looping music from the middle point?

    Well my other points still remain valid. Like the point of which the user pauses the application (ctrl + p) it won't check any of the conditions. In other words, if I have the sample play once (no loop), and make new condition when counter >= samples duration to set position to certain #. This will not work into effect unless the application is in focus (not paused, etc). This probably applies as an internet file too.

    If the sample stops playing while paused and skips the counter >= sample duration condition, well, its just not going to loop any more until I set it to play the sample again.

    Therefore, there is possibly going to be a slight aplication pause every time the sample ends, and tries to loop at a defined position.

Similar Threads

  1. [PAID] Seamless Looping OGG/Music Player Extension (to play music with loop points)
    By DinnerSonic in forum Paid Design & Development Requests
    Replies: 0
    Last Post: 6th October 2013, 07:27 PM
  2. Looping Music
    By Mantis in forum SWF/Flash Export Module Version 2.0
    Replies: 8
    Last Post: 3rd June 2010, 10:56 AM
  3. Looping music at middle of a song doesn't work.
    By N64Mario in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 9th March 2010, 07:53 PM
  4. Music Looping Problem
    By Bugsey in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th March 2009, 10:59 AM
  5. Looping Digital Music
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 5th October 2007, 10:09 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
  •