coastline 0.0.4
Loading...
Searching...
No Matches
wavread.h
Go to the documentation of this file.
1#ifndef COASTLINE_PLATFORM_WIN_WAVREAD_H
2#define COASTLINE_PLATFORM_WIN_WAVREAD_H
3
8
9#include <windows.h>
10// The headers below need the types of windows.h.
11#include <mmreg.h>
12#include <mmsystem.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
19#define WAVE_ERROR_MEMORY 0xe000
21#define WAVE_ERROR_CANNOT_OPEN 0xe100
23#define WAVE_ERROR_NOT_WAVE_FILE 0xe101
25#define WAVE_ERROR_CANNOT_READ 0xe102
27#define WAVE_ERROR_CORRUPT_WAVE_FILE 0xe103
28
41int WaveOpenFile(const char *pszPath, HMMIO *phmmio, WAVEFORMATEX **ppFormat, MMCKINFO *pckRiff);
42
53int WaveStartDataRead(HMMIO *phmmio, MMCKINFO *pckData, MMCKINFO *pckRiff);
54
68int WaveReadFile(HMMIO hmmio, DWORD dwRead, BYTE *pDest, MMCKINFO *pckData, DWORD *pdwActualRead);
69
83 const char *pszPath, DWORD *pdwSize, DWORD *pdwSamples, WAVEFORMATEX **ppFormat, void **ppData);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif // COASTLINE_PLATFORM_WIN_WAVREAD_H
typedef HMMIO
int WaveOpenFile(const char *pszPath, HMMIO *phmmio, WAVEFORMATEX **ppFormat, MMCKINFO *pckRiff)
Open a wave file and read its format into global memory, leaving the file at the end of the chunk of ...
int WaveStartDataRead(HMMIO *phmmio, MMCKINFO *pckData, MMCKINFO *pckRiff)
Seek to the start of the RIFF of an open wave file and descend into its chunk of data.
int WaveReadFile(HMMIO hmmio, DWORD dwRead, BYTE *pDest, MMCKINFO *pckData, DWORD *pdwActualRead)
Read data from the chunk of data of an open wave file.
int WaveLoadFile(const char *pszPath, DWORD *pdwSize, DWORD *pdwSamples, WAVEFORMATEX **ppFormat, void **ppData)
Read a wave file into global memory.
typedef BYTE
typedef DWORD