Photon 1.0.0
Loading...
Searching...
No Matches
RIFF.hpp
Go to the documentation of this file.
1/*
2 * =====================================================================
3 *
4 * Photon
5 * Copyright Amlal EL Mahrouss, all rights reserved.
6 *
7 * =====================================================================
8 */
9
10#pragma once
11
12#include <core/Core.hpp>
13
14#define PHOTON_RIFF_MAG "RIFF"
15
16// WAVE file header format
18{
19 unsigned char riff[4]; // RIFF string
20 unsigned int overall_size; // overall size of file in bytes
21 unsigned char wave[4]; // WAVE string
22 unsigned char fmt_chunk_marker[4]; // fmt string with trailing null char
23 unsigned int length_of_fmt; // length of the format data
24 unsigned int format_type; // format type. 1-PCM, 3- IEEE float, 6 - 8bit A law, 7 - 8bit mu law
25 unsigned int channels; // no.of channels
26 unsigned int sample_rate; // sampling rate (blocks per second)
27 unsigned int byterate; // SampleRate * NumChannels * BitsPerSample/8
28 unsigned int block_align; // NumChannels * BitsPerSample/8
29 unsigned int bits_per_sample; // bits per sample, 8- 8bits, 16- 16 bits etc
30 unsigned char data_chunk_header[4]; // DATA string or FLLR string
31 unsigned int data_size; // NumSamples * NumChannels * BitsPerSample/8 - size of the next chunk that will be read
32};
Definition RIFF.hpp:18
unsigned int overall_size
Definition RIFF.hpp:20
unsigned int sample_rate
Definition RIFF.hpp:26
unsigned int block_align
Definition RIFF.hpp:28
unsigned char wave[4]
Definition RIFF.hpp:21
unsigned int data_size
Definition RIFF.hpp:31
unsigned int channels
Definition RIFF.hpp:25
unsigned char riff[4]
Definition RIFF.hpp:19
unsigned int bits_per_sample
Definition RIFF.hpp:29
unsigned int length_of_fmt
Definition RIFF.hpp:23
unsigned char fmt_chunk_marker[4]
Definition RIFF.hpp:22
unsigned int format_type
Definition RIFF.hpp:24
unsigned char data_chunk_header[4]
Definition RIFF.hpp:30
unsigned int byterate
Definition RIFF.hpp:27