diff options
Diffstat (limited to 'src/parsec/include/snd_api.h')
| -rw-r--r-- | src/parsec/include/snd_api.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/parsec/include/snd_api.h b/src/parsec/include/snd_api.h new file mode 100644 index 0000000..b43d653 --- /dev/null +++ b/src/parsec/include/snd_api.h @@ -0,0 +1,49 @@ +/* + * PARSEC HEADER: snd_api.h + */ + +#ifndef _SND_API_H_ +#define _SND_API_H_ + + +// recognized sample formats + +enum sample_formats { + + SAMPLEFORMAT_INVALID, + + SAMPLEFORMAT_WAV, + SAMPLEFORMAT_VOC, + SAMPLEFORMAT_AU, + SAMPLEFORMAT_SAM +}; + + +// generic sample info + +struct sample_s { + + int format; + dword totalfilelength; + dword headerlength; + word datatype; + word numchannels; + dword samplerate; + word alignment; + word samplesize; + dword samplebytes; + byte* samplebuffer; +}; + + +// external functions + +sample_s * SND_ReadSample( sampleinfo_s *pSampleInfo ); +void SND_FreeSample( sample_s *pSample ); +void SND_ConvertToMono( sample_s *pSample ); +void SND_ConvertRate( sample_s *pSample, int samplerate ); + + +#endif // _SND_API_H_ + + |
