annotate wave.h @ 989:d70000fdff0b

Implemented IR and undefined bits of info word for address error exception frames
author Michael Pavone <pavone@retrodev.com>
date Wed, 27 Apr 2016 21:39:17 -0700
parents 140af5509ce7
children
rev   line source
pavone@467 1 /*
pavone@467 2 Copyright 2013 Michael Pavone
pavone@467 3 This file is part of BlastEm.
pavone@467 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
pavone@467 5 */
pavone@407 6 #ifndef WAVE_H_
pavone@407 7 #define WAVE_H_
pavone@407 8
pavone@407 9 #include <stdint.h>
pavone@407 10 #include <stdio.h>
pavone@407 11
pavone@407 12 #pragma pack(push, 1)
pavone@407 13
pavone@407 14 typedef struct {
pavone@407 15 char id[4];
pavone@407 16 uint32_t size;
pavone@407 17 char format[4];
pavone@407 18 } riff_chunk;
pavone@407 19
pavone@407 20 typedef struct {
pavone@407 21 char id[4];
pavone@407 22 uint32_t size;
pavone@407 23 } riff_sub_chunk;
pavone@407 24
pavone@407 25 typedef struct {
pavone@407 26 riff_chunk chunk;
pavone@407 27 riff_sub_chunk format_header;
pavone@407 28 uint16_t audio_format;
pavone@407 29 uint16_t num_channels;
pavone@407 30 uint32_t sample_rate;
pavone@407 31 uint32_t byte_rate;
pavone@407 32 uint16_t block_align;
pavone@407 33 uint16_t bits_per_sample;
pavone@407 34 riff_sub_chunk data_header;
pavone@407 35 } wave_header;
pavone@407 36
pavone@407 37 #pragma pack(pop)
pavone@407 38
pavone@407 39 int wave_init(FILE * f, uint32_t sample_rate, uint16_t bits_per_sample, uint16_t num_channels);
pavone@407 40 int wave_finalize(FILE * f);
pavone@407 41
pavone@407 42 #endif //WAVE_H_
pavone@407 43