Skip to content

Commit 551927e

Browse files
extend wave file header structure
1 parent 3d4ecff commit 551927e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/ml_wavfile.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,15 @@ union wavHeader
5858
char riff[4]; /*!< 'RIFF' */
5959
uint32_t fileSize; /*!< bytes to write containing all data (header + data) */
6060
char waveType[4]; /*!< 'WAVE' */
61-
62-
char format[4]; /*!< 'fmt ' */
63-
uint32_t lengthOfData; /*!< length of the fmt header (16 bytes) */
61+
union
62+
{
63+
struct
64+
{
65+
char format[4]; /*!< 'fmt ' */
66+
uint32_t lengthOfData; /*!< length of the fmt header (16 bytes) */
67+
};
68+
union wav_tag__header_u fmtTag;
69+
};
6470
uint16_t format_tag; /*!< 0x0001: PCM */
6571
uint16_t numberOfChannels; /*!< 'WAVE' */
6672
uint32_t sampleRate;

0 commit comments

Comments
 (0)