Pulsar  3d3a057
bfwav.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Wave file init
4  */
5 #pragma once
6 
8 #include <pulsar/bfwav/bfwav_internal.h>
9 
10 /// Wave file method categories
11 typedef enum {
12  PLSR_BFWAVCategoryType_Init = 0,
13  PLSR_BFWAVCategoryType_Info,
14  PLSR_BFWAVCategoryType_Data,
16 
17 /// Wave file sample formats
18 typedef enum {
19  /// 8-bit PCM encoded samples
20  PLSR_BFWAVFormat_PCM_8 = _PLSR_BFWAV_FORMAT_PCM_8,
21 
22  /// 16-bit PCM encoded samples
23  PLSR_BFWAVFormat_PCM_16 = _PLSR_BFWAV_FORMAT_PCM_16,
24 
25  /// DSP ADPCM encoded samples (Wave channel info should contain the needed ADPCM context to decode samples, see plsrBFWAVReadChannelInfo())
26  PLSR_BFWAVFormat_DSP_ADPCM = _PLSR_BFWAV_FORMAT_DSP_ADPCM,
28 
29 /// Wave file
30 typedef struct {
31  PLSR_Archive ar;
32 
33  PLSR_ArchiveHeaderInfo headerInfo;
34 
35  PLSR_ArchiveSection infoSection;
36  PLSR_ArchiveSection dataSection;
37 } PLSR_BFWAV;
38 
39 /// @copydoc plsrArchiveOpen
40 PLSR_RC plsrBFWAVOpen(const char* path, PLSR_BFWAV* out);
41 
42 /// @copydoc plsrArchiveOpenInside
43 PLSR_RC plsrBFWAVOpenInside(const PLSR_Archive* ar, u32 offset, PLSR_BFWAV* out);
44 
45 /// @copydoc plsrArchiveClose
46 void plsrBFWAVClose(PLSR_BFWAV* bfwav);
Wave file.
Definition: bfwav.h:30
Archive section.
Definition: archive.h:34
8-bit PCM encoded samples
Definition: bfwav.h:20
PLSR_RC plsrBFWAVOpenInside(const PLSR_Archive *ar, u32 offset, PLSR_BFWAV *out)
Open from inside another archive at specified offset.
Common archive header information.
Definition: archive.h:22
PLSR_RC plsrBFWAVOpen(const char *path, PLSR_BFWAV *out)
Open from a file at specified path.
Archive container interface.
void plsrBFWAVClose(PLSR_BFWAV *bfwav)
Close archive, releasing resources if applicable.
PLSR_BFWAVFormat
Wave file sample formats.
Definition: bfwav.h:18
16-bit PCM encoded samples
Definition: bfwav.h:23
Archive file.
Definition: archive.h:75
u32 PLSR_RC
Result code returned by Pulsar functions.
Definition: types.h:73
PLSR_BFWAVCategoryType
Wave file method categories.
Definition: bfwav.h:11
DSP ADPCM encoded samples (Wave channel info should contain the needed ADPCM context to decode sample...
Definition: bfwav.h:26