From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- src/parsec/include/snd_api.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/parsec/include/snd_api.h (limited to 'src/parsec/include/snd_api.h') 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_ + + -- cgit v1.2.3