I’m quite new to fmod. I’m making a sound manager for a little game i’m writting. The question might sound stupid but.. what’s the difference between stream and sample? After a little search in the documentation and on this forum, i think that streams just decode the part while it is playing and play that part with a sample and have callback and samples are a full sound. Am i right? If no, i would like some explaination or some links please (:
- NoUse asked 16 years ago
You are quite right, streams are decoded and read while they play, saving memory.
Samples are loaded one-time, meaning when you call FSOUND_Sample_Load the file is entirely decoded into memory, and can then be played as often as necessary without prior decompression, saving cpu time.
Streaming is often used for music, e.g. the popular media player winamp streams mp3’s from disk/internet. With FMOD you can open an mp3 as a sample, too, but it would take you around 50megs of ram for one file only, because it is decoded into memory first.
- night answered 16 years ago
Please login first to submit.