New topic: Sound and Thread?
<http://forums.realsoftware.com/viewtopic.php?t=34207> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message DrDungeon Post subject: Sound and Thread?Posted: Wed Jun 09, 2010 7:05 pm Joined: Thu Jan 03, 2008 11:29 am Posts: 76 Hi guys! A quick question about sound! In my app, there are many places where I load in a sound file, like an mp3 or an aiff. Works fine, however if its more than a meg or so there is a distinct freeze/stop for a second or so in my app while it loads. Certainly this is normal, and for small files not really an issue. But if I load something larger, say 5-8 megs, like a background ambient, the stop time is more significant. I had heard somewhere about doing things on another "thread", but not real familiar with this. Is it possible to somehow load a sound file on another "thread" - or pre-load it in memory somehow ahead of time that it doesn't pause the app while loading? I put a lot of simple, real short sounds (clicks and the like) right into the App area to build with the project, but I know there's a limit to how much stuff can be packed there. Any info about this would be appreciated, as always! Thanks! -Robert Top DrDungeon Post subject: Re: Sound and Thread?Posted: Wed Jun 09, 2010 7:34 pm Joined: Thu Jan 03, 2008 11:29 am Posts: 76 oops! Easier than I thought! All I had to do was make a few public sound vars and load them when the project opens! A simple solution. Thanks anyway. -Robert Top serd83 Post subject: Re: Sound and Thread?Posted: Wed Jun 09, 2010 7:35 pm Joined: Thu Feb 22, 2007 7:08 pm Posts: 1133 I have bad experience with MP3 when playing sounds in sequence. Not sure what is wrong, but RB does not work good with MP3 files in sequence. WAV or AIFF(not try it yet) would be better for playing sounds in sequence. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
