DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/aviwriter/riff_wav_writer.h
00001 
00002 #ifndef __ISP_UTILS_V4_AVI_RIFF_WAV_WRITER_H
00003 #define __ISP_UTILS_V4_AVI_RIFF_WAV_WRITER_H
00004 
00005 #include <stdint.h>
00006 #include "riff.h"
00007 #include "waveformatex.h"
00008 #include "bitmapinfoheader.h"
00009 
00010 typedef struct riff_wav_writer {
00011         riff_stack*             riff;
00012         int                     state;
00013         int                     fd,own_fd;
00014         void*                   fmt;
00015         size_t                  fmt_len;
00016 } riff_wav_writer;
00017 
00018 enum {
00019         RIFF_WRITER_INIT,
00020         RIFF_WRITER_HEADER,
00021         RIFF_WRITER_DATA,
00022         RIFF_WRITER_FOOTER,
00023         RIFF_WRITER_DONE
00024 };
00025 
00026 riff_wav_writer *riff_wav_writer_create();
00027 int riff_wav_writer_set_format(riff_wav_writer *w,windows_WAVEFORMAT *f);
00028 int riff_wav_writer_set_format_old(riff_wav_writer *w,windows_WAVEFORMATOLD *f);
00029 int riff_wav_writer_set_format_ex(riff_wav_writer *w,windows_WAVEFORMATEX *f,size_t len);
00030 int riff_wav_writer_assign_file(riff_wav_writer *w,int fd);
00031 int riff_wav_writer_open_file(riff_wav_writer *w,const char *path);
00032 void riff_wav_writer_fsync(riff_wav_writer *w);
00033 int riff_wav_writer_begin_header(riff_wav_writer *w);
00034 int riff_wav_writer_begin_data(riff_wav_writer *w);
00035 int riff_wav_writer_end_data(riff_wav_writer *w);
00036 riff_wav_writer *riff_wav_writer_destroy(riff_wav_writer *w);
00037 int riff_wav_writer_data_write(riff_wav_writer *w,void *buffer,size_t len);
00038 int64_t riff_wav_writer_data_seek(riff_wav_writer *w,int64_t offset);
00039 int64_t riff_wav_writer_data_tell(riff_wav_writer *w);
00040 
00041 #endif /* __ISP_UTILS_V4_AVI_RIFF_WAV_WRITER_H */
00042