Pulsar  3d3a057
bfsar_wave_archive.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Sound archive wave archive table access
4  */
5 #pragma once
6 
7 #include <pulsar/bfsar/bfsar.h>
8 #include <pulsar/bfwar/bfwar.h>
9 
10 /// Wave archive information
11 typedef struct {
12  u32 fileIndex; ///< Index in the file table (see plsrBFSARFileGet())
13 
14  bool hasStringIndex;
15  u32 stringIndex; ///< Name index in the string table, populated if `hasStringIndex` is `true` (see plsrBFSARStringGet())
16 
17  bool hasWaveCount;
18  u32 waveCount; ///< Total wave count in archive, populated if `hasWaveCount`
20 
21 /// Fetch wave archive information from the specified index in the wave archive table
23 
24 /// Open a wave archive from a plsrBFSARWaveArchiveGet() result (see plsrBFWAROpenInside())
25 PLSR_RC plsrBFSARWaveArchiveOpen(const PLSR_BFSAR* bfsar, const PLSR_BFSARWaveArchiveInfo* waveArchiveInfo, PLSR_BFWAR* out);
26 
27 NX_INLINE u32 plsrBFSARWaveArchiveCount(const PLSR_BFSAR* bfsar) {
28  return bfsar->waveArchiveTable.info.count;
29 }
Wave archive information.
Definition: bfsar_wave_archive.h:11
Sound archive file.
Definition: bfsar.h:34
Wave archive file.
Definition: bfwar.h:17
Wave archive init.
u32 count
Table entry/block count.
Definition: archive.h:41
u32 stringIndex
Name index in the string table, populated if hasStringIndex is true (see plsrBFSARStringGet()) ...
Definition: bfsar_wave_archive.h:15
PLSR_RC plsrBFSARWaveArchiveGet(const PLSR_BFSAR *bfsar, u32 index, PLSR_BFSARWaveArchiveInfo *out)
Fetch wave archive information from the specified index in the wave archive table.
Sound archive init.
PLSR_ArchiveTableInfo info
Cached table information.
Definition: archive.h:47
u32 fileIndex
Index in the file table (see plsrBFSARFileGet())
Definition: bfsar_wave_archive.h:12
u32 waveCount
Total wave count in archive, populated if hasWaveCount
Definition: bfsar_wave_archive.h:18
PLSR_RC plsrBFSARWaveArchiveOpen(const PLSR_BFSAR *bfsar, const PLSR_BFSARWaveArchiveInfo *waveArchiveInfo, PLSR_BFWAR *out)
Open a wave archive from a plsrBFSARWaveArchiveGet() result (see plsrBFWAROpenInside()) ...
u32 PLSR_RC
Result code returned by Pulsar functions.
Definition: types.h:73