fileUnit.h
  0
  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
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
/*
 *  Unit.h
 *
 *  Created by Daisuke Nogami.
 *  Copyright 2005 Daisuke Nogami [null-null.net]. All rights reserved.
 *
 *  This program referred to laUnit.h [lalalila.org]. thanks;-)
 */
 
// vector
#include <vector>
using namespace std;
 
////////////////////////////////////////////////////
// SinOscUnit
////////////////////////////////////////////////////
 
class SinOscUnit{
private:
  float mFreq, mPhase;
public:
  float mVol, uFreq;
 
  SinOscUnit();
  float sigProc();
};
 
////////////////////////////////////////////////////
// NoiseUnit
////////////////////////////////////////////////////
 
class NoiseUnit{
public:
  float mVol;
 
  NoiseUnit();
  float sigProc();
};
 
////////////////////////////////////////////////////
// AudioUnit
////////////////////////////////////////////////////
 
class AudioUnit{
protected:
  float *mAudioData;
  unsigned long maxAudioLen;
 
public:
  unsigned long mAudioLen;
  unsigned long mAudioPos;
  float mVol;
 
  AudioUnit();
  ~AudioUnit();
  virtual float sigProc();
  void load( const char *fileName, unsigned long maxAudioLen );
};
 
////////////////////////////////////////////////////
// AirstreamUnit
////////////////////////////////////////////////////
 
class AirstreamUnit : public AudioUnit{
private:
  float topower;
public:
  float power;
 
  AirstreamUnit();
  float sigProc();
};
 
////////////////////////////////////////////////////
// RainUnit
////////////////////////////////////////////////////
 
class RainUnit : public AudioUnit{
public:
  RainUnit();
  float sigProc();
};
 
////////////////////////////////////////////////////
// RainDropUnit
////////////////////////////////////////////////////
 
class RainDropUnit : public AudioUnit{
private:
  unsigned long *mAudioPosSet;
  bool *mAudioPosSetPlay;
  int next;
public:
  RainDropUnit();
  ~RainDropUnit();
  float sigProc();
 
  void push();
};
[トップ] [一覧] [最終更新] [検索] [バックアップ]