00001 #ifndef __AFWAV_I_HPP__
00002 #define __AFWAV_I_HPP__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "tdef.h"
00032 #include "caudiox.hpp"
00033 #include "uti.h"
00034
00035
00036
00037 #ifdef __CC_MSVC__
00038 #pragma pack(push,1)
00039 #elif __CC_BORLANDC__
00040 typedef struct {CHAR8 x; INT2 y; } ____tmp_tdef_align_test___;
00041 #if sizeof(____tmp_tdef_align_test___)>3
00042 #error You must disable Word Alignment
00043 #endif
00044 #endif
00045
00046
00047
00048
00049
00050
00051 #define IGNORE_CUE_LABEL
00052
00053
00054
00055 typedef struct {
00056 CHAR8 chunkName [4] MINALIGN;
00057 UINT32 len MINALIGN;
00058 } WAVChunk;
00059
00060 typedef struct {
00061 CHAR8 Literal_RIFF[4] MINALIGN;
00062 UINT32 len MINALIGN;
00063 CHAR8 Literal_WAVE[4] MINALIGN;
00064 } WAVHdr ;
00065
00066 #define WFORMAT_PCM 0x0001
00067
00068 typedef struct {
00069 UINT16 wFormatTag MINALIGN;
00070 UINT16 wChannels MINALIGN;
00071 UINT32 dwSamplesPerSec MINALIGN;
00072 UINT32 dwAvgBytesPerSec MINALIGN;
00073 UINT16 wBlockAlign MINALIGN;
00074 } FormatInfo;
00075
00076 typedef struct {
00077 UINT32 dwName MINALIGN;
00078 UINT32 dwPosition MINALIGN;
00079 char fccChunk[4] MINALIGN;
00080 UINT32 dwChunkStart MINALIGN;
00081 UINT32 dwBlockStart MINALIGN;
00082 UINT32 dwSampleOffset MINALIGN;
00083 } CuePoint;
00084
00085
00086 class UInt32 {
00087 public: UINT32 i;
00088 public:
00089 UInt32( ) {};
00090 UInt32( UINT32 n ): i(n) {};
00091 UInt32( const UInt32 &n ): i(n.i) {};
00092 UInt32& operator = (const UInt32 & a) { i=a.i; return *this; };
00093 };
00094
00095 int operator < (const UInt32& a, const UInt32& b);
00096 int operator == (const UInt32& a, const UInt32& b);
00097 int operator > (const UInt32& a, const UInt32& b);
00098
00099 typedef SetListT<UInt32> CueNames;
00100
00101
00102
00103 char *wstr( FILE *f );
00104 char *wstr( FILE *f, UINT32 l );
00105 VOID mrk_labl(Mark1DList &m, CueNames &cn, CHAR8 *buf);
00106 VOID mrk_note(Mark1DList &m, CueNames &cn, CHAR8 *buf);
00107 VOID mrk_ltxt(Mark1DList &m, CueNames &cn, CHAR8 *buf);
00108
00109 size_t strlen_zeven( const char *s );
00110 void puts_zeven( const char * s, FILE *f );
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 #endif