User Tag List

Results 1 to 6 of 6

Thread: Playing samples causes slowdown

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Playing samples causes slowdown

    I've been working on adding music to the areas of my game. There are areas that have two different tracks playing in 2 different channels (one for night and one for day), but I have noticed this causes a performance drop. Admittedly, I'm using the standard runtime, and I'm running a 4000-event engine. There's also a new lighting system that requires per-loop graphical operations. However, it seemed very strange to me that playing two simultaneous samples would add up to cause a slowdown. What I'm doing to fix this somewhat is only play the sample that's needed according to the time of the day, and stop the other channel. This improves the performance a little, but not completely. If I don't find a fix, I'll have to can the new lighting system.

    The reason why I'm posting is to find out of there's a way to build an external music player, and if this would increase performance at all. I quickly tried making a separate application that did this and I still got some slowdown. The idea would be to have the two apps talk, and one tell the other what to play. If this could be made with an extension that somehow handled the sound engine as a separate process, I would be willing to talk about hiring.

    Thanks in advance for any recommendations or help!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    How big are these samples/music? Did you try to run the Lighting system without the samples playing and is there a slowdown,.or is it just when they are playing this happens?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for answering. Yeah, the game runs fine if the music samples are not playing. They're only 900kb .oggs. I take it MMF just has too much to handle, but I always thought the sound engine was run in a process separate from MMF's graphical engine. Running the game without samples (and with the lighting system) shows no slowdown. I suppose I just hit a threshold of sorts. I've tried playing around with the engine to only load/play one channel most of the time—this speeds up the game a little. I would like to know if there's a better solution, though.

    I suppose the question is if it would be worth it building an external sound player (in terms of performance), or if it would run as slow. Also, if yes, if it's possible to make an extension to handle this as a separate process instead of building an external .exe to run simultaneously to the game. I'd just need play/pause/looping/volume controls for 2 channels.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry I don't know the answer to that. Maybe shoot A PM to the clickteam or maybe someone will chime in here.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 'Nifflas Sounds Object' maybe?

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Strife's Avatar
    Join Date
    Sep 2006
    Location
    Upstate NY
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to revive an old thread, but has any progress been made on this? My game is getting to the point where playing any sample will cause a noticeable pause by about 1-2 frames, which hampers an otherwise solid 60fps experience.

    I notice that many commercial PC games cram all of their sound effects into a single audio file, then play specific sounds by jumping to a specific point in the audio track. It's arguable whether or not this will solve anything though, and it would be extremely tedious to edit/replace existing sounds using this method. I would very much prefer to handle sound outside the core game in some way.

Similar Threads

  1. Playing Samples = slowdown
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 23rd March 2012, 11:18 PM
  2. Playing Samples?
    By Arnax in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 18th February 2012, 07:12 AM
  3. My application crashes WHEN PLAYING SAMPLES!?
    By Fr34kSh0w in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd April 2011, 06:28 PM
  4. Samples and Music not playing in sub-app
    By Chaos in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th December 2008, 04:27 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
  •