User Tag List

Results 1 to 10 of 10

Thread: looping ogg samples in MMF2

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    looping ogg samples in MMF2

    I'm just beginning to put in bgm but I want to use ogg files to keep the file sizes low. It seems like ogg's are only called through samples and not music. Unfortunately, this means there is no "Has a Music just finished" condition.

    I tried to use the following:

    Start of Frame:
    -Play sample XXX on Channel#1
    Is sample not playing:
    -Play sample XXXX on Channel#2

    Sadly, this results in a crash when the second event line activates. There isn't much documentation on sound handling, so does anyone know what might be happening? Or are there any articles written on this that I might be missing with basic searches?

    Thanks in advance,

    Mobichan

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2007
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    you should be able to use the 'is a specific sample not playing' condition...

    you can also choose the 'play and loop a sample' action
    0 sets looping forever, otherwise choose a number of repetitions

    maybe there is something about he channel switching?

    Dave


    I tried your code examp,le on my machine and it seems to work

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    Do you use the latest MMF2 build? The early ones can cause crashes on some machines when you attempt to play ogg files.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    I just realized that after a recent install, I didn't apply the update patch. But even after upgrading to bR247 it still has the same problem.

    Also, if I play the samples "from a file", the sound will play static until I click on the title bar of the game window (and resume static when I stop clicking on the title window.

    Another annoying thing is that when I add a file to my samples list, there is no way to remove it (except rolling back to a previous version of my game)

    Anyone have any ideas?

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    bump

  6. #6
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,822
    Mentioned
    7 Post(s)
    Tagged
    2 Thread(s)

    Re: looping ogg samples in MMF2

    If you save MMF will remove any unused samples at that time.

    I can't reproduce the static problem.
    Can you upload a file with an OGG to show this?

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    Here is a brand new file I created that still demonstrates the same problem.

    File with sample issue

    The initial sample is about 12 seconds long. After that, it should go and play the loopable sample. All I hear is static once the second loop begins. (I've tried it on 2 PC's to make sure it wasn't my home PC) Also, if you click on the title bar once you hear static, it will reinitialize the second loop.

    I wondered if it might be the sample rate of the ogg. I am using 325, but I can try lower. I also got some wav versions of the files, but they are a bit larger, so I would rather go with ogg if possible.

    Hope this helps find the problem,

    mobichan

  8. #8
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,822
    Mentioned
    7 Post(s)
    Tagged
    2 Thread(s)

    Re: looping ogg samples in MMF2

    Try checking the application property play sounds over frames in the Application-runtime properties

    Another good option might be to check the do not mute when loses focus.

    Then I would also just play and loop under the start of frame.
    Once you have checked the play sounds over frames you shouldn't need to test if it is playing.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    The initial sample is about 12 seconds long. After that, it should go and play the loopable sample. All I hear is static once the second loop begins. (I've tried it on 2 PC's to make sure it wasn't my home PC) Also, if you click on the title bar once you hear static, it will reinitialize the second loop.
    I checked the example. When the intro has finished played, the second event (Bgm_lvl01_intro is not playing) will remain true all the time. Thus, the loop sample will start over on every main loop (usually 50 times per second).

    The condition 'Bgm_lvl01_intro is not playing' doesn't trigger one time only when the sound stops playing. On every main loop, that condition will be true and trigger it's actions whenever the specified sound is not playing. By this reason, you have to add an addition condition to restrict it to happen only one time. In this case either 'run this event once' or 'Bgm_lvl01_loop is not playing' would solve your problem.

    The reason that the sound starts to play when the application loses focus, or you do something else to to pause the application, is that the main event loop will not run. That finally gives your sound a chance to play without being resetted.

    This is basically not an MMF2 problem, it's your application which is incorrectly programmed.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: looping ogg samples in MMF2

    Nifflas: Thanks for the info on sound. I can't wait for the wiki to be updated with info like this. ^_^

    Mobichan

Similar Threads

  1. question about mmf2 samples
    By Gustavo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th November 2012, 04:22 PM
  2. Why are samples softer in MMF2 than outside MMF2?
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 8th March 2012, 11:29 PM
  3. Will MMF2 ever get looping audio?
    By dustingunn in forum Multimedia Fusion 2 - Technical Support
    Replies: 27
    Last Post: 18th August 2009, 02:53 PM
  4. Samples
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 17th May 2008, 10:15 PM
  5. Looping MODs played through MMF2
    By konjak in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th February 2007, 08:01 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
  •