-
Notifications
You must be signed in to change notification settings - Fork 2
/
sample.h
37 lines (27 loc) · 799 Bytes
/
sample.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Sample.h: interface for the Sample class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SAMPLE_H__A4994289_1F0A_490A_8AB6_9943B03DB4C6__INCLUDED_)
#define AFX_SAMPLE_H__A4994289_1F0A_490A_8AB6_9943B03DB4C6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Sample
{
public:
Sample();
virtual ~Sample();
bool LoadFromFile(char* filename);
bool GenerateSine(int size);
void MakeMinMax(int size);
void GetMinMax(char** ppMin, char **ppMax, int *pSize);
char* GetFilename() { return m_filename; }
void Normalize();
public:
short *m_pData;
int m_nSamples;
char *m_pMin, *m_pMax;
int m_nMinMaxSize;
char m_filename[1024];
};
#endif // !defined(AFX_SAMPLE_H__A4994289_1F0A_490A_8AB6_9943B03DB4C6__INCLUDED_)