/[projet1]/public/pc/tools/oric/Bin2Tap/PulseWaveWriter.h
Defence Force logotype

Contents of /public/pc/tools/oric/Bin2Tap/PulseWaveWriter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 315 - (show annotations)
Tue Apr 27 13:27:38 2010 UTC (9 years, 6 months ago) by Vampire
File MIME type: text/plain
File size: 1422 byte(s)


1 //-------------------------------------------------------------------------------------------------
2 // PulseWaveWriter.h
3
4 #pragma once
5
6 //-------------------------------------------------------------------------------------------------
7 // >>>>> [ Includes ]
8
9 #include "Bin2Tap.h"
10
11
12 class CPulseWaveWriter
13 {
14 private:
15 struct SChunkHeader
16 {
17 DWORD m_ID;
18 DWORD m_Length;
19 };
20
21 struct SWaveHeader
22 {
23 SChunkHeader m_FileHeader;
24 DWORD m_Format;
25 };
26
27 struct SWaveFormat
28 {
29 SChunkHeader m_FileHeader;
30 short m_AudioFormat;
31 short m_NumChannels;
32 DWORD m_SampleRate;
33 DWORD m_ByteRate;
34 short m_BlockAlign;
35 short m_BitsPerSample;
36 };
37
38 public:
39 CPulseWaveWriter( EBitFormat format, ESampleRate rate);
40 ~CPulseWaveWriter( void);
41
42 bool Open( LPCTSTR filename);
43 void Close( void);
44
45 void WritePulse( bool long_pulse);
46 void WriteBlank( float time);
47
48 private:
49 CFile * m_OutputFile;
50
51 bool m_ReallyClose;
52
53 int m_BitDepth;
54 int m_Rate;
55 int m_ShortPulseLength;
56 int m_LongPulseLength;
57 int m_NegativeEdge;
58 int m_NeuteralEdge;
59 int m_PositiveEdge;
60
61 int m_DataLengthOffset;
62
63 bool m_PositivePulse;
64 };

  ViewVC Help
Powered by ViewVC 1.1.26