views:

38

answers:

1

Hey everyone,

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?! any help is apreciated. thanks in advance.

chris

A: 

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.

Mathew Block