streaming audio

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RE: streaming audio

      8 seconds? Really? That seems excessive. Where is the bottleneck, in the decompression or the file IO? I wonder if there's a performance bug in that function.

      Audio programming is a very complex subject and could fill an entire book. There is usually at least one person dedicated to it on any large project. You have the basic idea, though. You spin up another thread that reads a chunk of data from the hard drive, decompresses it, then sends it to the streaming audio buffer. It keeps doing this until the file is fully loaded and decompressed.

      Here's a link to someone's attempt to make an OGG streaming class:
      gamedev.net/topic/221938-here-…-directsound-bsd-license/

      I haven't dug too deeply into his code, but his approach seems reasonable at first glance. It might give you a starting point.

      Also, you totally shouldn't worry about it. If your choice is an 8-second load or no music, I would opt for no music. Remember that you'll be showing this at GDC. People can't hear it anyway. Besides, you have bigger fish to fry.

      -Rez
    • Five minutes of music is probably overkill. Most songs on The Sims Medieval were about 30 seconds, with the signature songs being about a minute. I think the only music that was any longer was the music the Bard could learn. Still, it wouldn't be a problem with a proper streaming system, which you can make a goal for the next game (or skip if you don't about audio programming).

      -Rez
    • you can also use third party libraries like Bass (un4seen.com) they stream audio files from disk. It's faster since you don't have to read/process the entire file. It's perfect for menu and introduction. You can also choose to read it in memory if you don't want to load music when the game have started.
      MCSE/MCDBA/Programmer C,C++,PERL,PHP
    • I use irrKlang in our game, I highly recommend it.
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • Originally posted by mholley519
      I use irrKlang in our game, I highly recommend it.

      Careful, it can't be used for commercial products without paying them a licensing fee. If you're going to spend money, you really can't go wrong with fmod. It's been used in nearly every project I've worked on. It's relatively cheap for indie games and free for non-commercial use.

      -Rez
    • The Indie Licence for irrKlang is 80$ for unlimited use on games that are sold for 25$ or less, so it's perfect for indie games, they even let you use the library for free until you are ready to release, I thought it was great as it's not just a one time licence, but for multiple games.
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz

      The post was edited 1 time, last by mholley519 ().

    • Yeah, that's definitely better than fmod in terms of price, but you still have to pay a fee, which is a deal-breaker for me. ;)

      -Rez