开发者

How to send Sound Stream of a file from disk over network using FMOD?

i'm currently working on a project in college. my application should do some things with audio files from my computer. i'm using FMOD as sound library.

the problem i have is, that i dont know how to access the data of a soundfile (wich was opened and startet using the FMOD methods) to stream it over network for playback on another pc in the net.

does anyone has a similar problem开发者_StackOverflow中文版?! any help is apreciated. thanks in advance.

chris


There are two simple ways to access sound data from an FMOD sound. The first is you can load the file as a sample using createSound then use Sound::lock and Sound::unlock to get parts of the result PCM file.

The other method is load the sound as a stream using createStream (you'll want to use the OPEN_ONLY flag here too so it doesn't automatically fill the stream buffer) and use Sound::readData to read a chunk at a time from the file, this will decompress data on demand instead of doing it up front like the other method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜