SFML community forums

Help => Audio => Topic started by: haxifix on January 12, 2013, 06:37:16 pm

Title: Playing raw audio data from a DDP
Post by: haxifix on January 12, 2013, 06:37:16 pm
I was wondering if the SFML 2 audio library could play raw audio data from a DDP fileset.  Does anyone know if this is possible?
Title: Re: Playing raw audio data from a DDP
Post by: eXpl0it3r on January 12, 2013, 07:11:54 pm
From the for everyone publicly available and easy to read documentation (http://www.sfml-dev.org/documentation/2.0/classsf_1_1SoundBuffer.php#af8cfa5599739a7edae69c5cba273d33f):
Quote
bool sf::SoundBuffer::loadFromMemory (const void * data, std::size_t sizeInBytes)
   
Load the sound buffer from a file in memory.

Here is a complete list of all the supported audio formats: ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.

It's now your job to determine if that DDP file matches any of the supported formats. This can either be done, by reading more about the format or simply testing it. ;)