class ISoundData
{
public:
virtual void Destroy()=0;//{delete this;}
virtual unsigned GetSize()=0;//in bytes of the sound data
virtual WAVEFORMATEX* GetFormat()=0;//ISoundData imp still "owns" this
virtual void Read(unsigned char *data, unsigned bytes)=0;//starts where last read left of. Go back to start having reached the end
};
Loading sound files
I want to create a set of classes for loading sound files which I can easily extend and supports loading the entire file into a buffer and streaming the file however I'm not entirly sure on the interface or how to implement streaming.
Also I'm not sure on the best way to work out which class is able (if any) to load a given file...
The output needs to be in a format suitable for XAudio2, ie PCM, adPCM or xWMA
I know how to load basic PCM waves filling out the WAVEFORMATEX structure and reading the data section, however I could not find any info on how to load other wave formats, nor how exactly I should use WAVEFORMATEX for formats larger than 20 bytes...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement