[ Home ]

wav.c File Reference

Writes wav files. More...

#include <stdlib.h>
#include <stdio.h>
#include "../common/platform.h"
#include "../common/common_utils.h"
#include "../console/console.h"

Include dependency graph for wav.c:

Data Structures

struct  wavheader_t


PUBLIC wtBoolean wav_write (const char *filename, void *data, W32 size, W16 channels, W32 sample_rate, W16 sample_size)
 Writes a wav file.

Detailed Description

Writes wav files.

Michael Liebscher

Function Documentation

PUBLIC wtBoolean wav_write ( const char *  filename,
void *  data,
W32  size,
W16  channels,
W32  sample_rate,
W16  sample_size 

Writes a wav file.

[in] filename Pointer to a null-terminated string that specifies the name of the file to save as.
[in] data Pointer to audio data.
[in] size Length of audio data in bytes.
[in] channels Number of Channels (0x01 = Mono, 0x02 = Stereo).
[in] sample_rate Sample Rate in Hz.
[in] sample_size Bytes Per Sample: 1 = 8 bit Mono, 2 = 8 bit Stereo or 16 bit Mono, 4 = 16 bit Stereo
On success true, otherwise false.

Here is the caller graph for this function: