Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Sample Class Reference

class Sample - handles all the sampling More...

#include <samples.h>

Collaboration diagram for Sample:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Sample (C6510 *a6510)
 C'tor.

 ~Sample ()
 D'tor.

void sampleEmuInit (sidEmu *aTheSidEmu)
 precalculate tables + reset

void sampleEmuCheckForInit ()
void sampleEmuReset (sidEmu *aTheSidEmu)
 reset some important variables


Private Types

enum  {
  FM_NONE, FM_GALWAYON, FM_GALWAYOFF, FM_HUELSON,
  FM_HUELSOFF
}

Private Member Functions

void channelReset (sampleChannel &ch)
void channelFree (sampleChannel &ch, const uword regBase)
void channelTryInit (sampleChannel &ch, const uword regBase)
ubyte channelProcess (sampleChannel &ch, const uword regBase)
void sampleEmuTryStopAll ()
sbyte sampleEmuSilence ()
sbyte sampleEmu ()
sbyte sampleEmuTwo ()
void GalwayInit ()
sbyte GalwayReturnSample ()
void GetNextFour ()

Private Attributes

friend Mixer
udword sampleClock
sampleChannel ch4
sampleChannel ch5
ubyte galwayNoiseTab2 [64 *16]
sbyte(Sample::* sampleEmuRout )()
 function pointer to the sampler routine

ubytec64mem1
 pointer to 64KB C64-RAM owned by C6510

ubytec64mem2
 pointer to Basic-ROM, VIC, SID, I/O, Kernal-ROM owned by C6510


Detailed Description

class Sample - handles all the sampling

Definition at line 59 of file samples.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
FM_NONE 
FM_GALWAYON 
FM_GALWAYOFF 
FM_HUELSON 
FM_HUELSOFF 

Definition at line 64 of file samples.h.


Constructor & Destructor Documentation

Sample::Sample C6510 a6510  ) 
 

C'tor.

Definition at line 46 of file samples.cpp.

References C6510::c64mem1, c64mem1, C6510::c64mem2, c64mem2, CTOR, sampleEmuRout, and sampleEmuSilence().

Sample::~Sample  ) 
 

D'tor.

Definition at line 60 of file samples.cpp.

References DTOR.


Member Function Documentation

void Sample::channelFree sampleChannel ch,
const uword  regBase
[inline, private]
 

Definition at line 83 of file samples.cpp.

References sampleChannel::Active, c64mem2, FM_NONE, and sampleChannel::Mode.

Referenced by channelProcess(), sampleEmuCheckForInit(), and sampleEmuReset().

ubyte Sample::channelProcess sampleChannel ch,
const uword  regBase
[inline, private]
 

Definition at line 152 of file samples.cpp.

References sampleChannel::Address, c64mem1, channelFree(), sampleChannel::EndAddr, HI, LO, sampleChannel::Pos_stp, sampleChannel::PosAdd_stp, sampleChannel::RepAddr, sampleChannel::Repeat, sampleChannel::SampleOrder, sampleChannel::Scale, SO_LOWHIGH, ubyte, udword, and uword.

Referenced by sampleEmu(), and sampleEmuTwo().

void Sample::channelReset sampleChannel ch  )  [private]
 

Definition at line 69 of file samples.cpp.

References sampleChannel::Active, FM_NONE, sampleChannel::Mode, sampleChannel::Period, and sampleChannel::Pos_stp.

Referenced by sampleEmuReset().

void Sample::channelTryInit sampleChannel ch,
const uword  regBase
[inline, private]
 

Definition at line 90 of file samples.cpp.

References sampleChannel::Active, sampleChannel::Address, c64mem2, sampleChannel::EndAddr, FM_GALWAYON, FM_HUELSON, FM_NONE, sampleChannel::Mode, sampleChannel::Period, sampleChannel::Pos_stp, sampleChannel::PosAdd_stp, readLEword(), sampleChannel::RepAddr, sampleChannel::Repeat, sampleClock, sampleChannel::SampleOrder, sbyte, sampleChannel::Scale, udword, uword, and sampleChannel::VolShift.

Referenced by sampleEmuCheckForInit().

void Sample::GalwayInit  )  [private]
 

Definition at line 393 of file samples.cpp.

References sampleChannel::Active, sampleChannel::Address, c64mem2, ch4, sampleChannel::Counter, FM_GALWAYON, GalwayReturnSample(), GetNextFour(), sampleChannel::LoopWait, sampleChannel::Mode, sampleChannel::NullWait, sampleChannel::Pos_stp, readLEword(), sampleChannel::SamAddr, sampleChannel::SamLen, sampleEmuRout, sampleEmuSilence(), and uword.

Referenced by sampleEmuCheckForInit().

sbyte Sample::GalwayReturnSample  )  [private]
 

Definition at line 439 of file samples.cpp.

References sampleChannel::Active, ch4, sampleChannel::Counter, FM_GALWAYOFF, galwayNoiseTab2, GetNextFour(), HI, sampleChannel::Mode, sampleChannel::Period_stp, sampleChannel::Pos_stp, sampleChannel::SamAddr, sampleChannel::SamLen, sampleEmuRout, sampleEmuSilence(), sbyte, and udword.

Referenced by GalwayInit().

void Sample::GetNextFour  )  [inline, private]
 

Definition at line 366 of file samples.cpp.

References sampleChannel::Address, c64mem1, ch4, sampleChannel::Counter, sampleChannel::LoopWait, sampleChannel::NullWait, sampleChannel::Period, sampleChannel::Period_stp, sampleClock, udword, and uword.

Referenced by GalwayInit(), and GalwayReturnSample().

sbyte Sample::sampleEmu  )  [private]
 

Definition at line 345 of file samples.cpp.

References sampleChannel::Active, ch4, channelProcess(), sampleConvertTab, sbyte, and sampleChannel::VolShift.

Referenced by sampleEmuCheckForInit().

void Sample::sampleEmuCheckForInit  ) 
 

Definition at line 294 of file samples.cpp.

References c64mem2, ch4, ch5, channelFree(), channelTryInit(), FM_HUELSON, GalwayInit(), sampleChannel::Mode, sampleEmu(), sampleEmuRout, sampleEmuTryStopAll(), and sampleEmuTwo().

Referenced by sidEmu::sidEmuFillBuffer().

void Sample::sampleEmuInit sidEmu aTheSidEmu  ) 
 

precalculate tables + reset

Definition at line 263 of file samples.cpp.

References galwayNoiseTab1, galwayNoiseTab2, and sampleEmuReset().

Referenced by sidEmu::sidEmuConfigure().

void Sample::sampleEmuReset sidEmu aTheSidEmu  ) 
 

reset some important variables

Definition at line 243 of file samples.cpp.

References sidEmu::C64_clockSpeed, c64mem2, ch4, ch5, channelFree(), channelReset(), sidEmu::PCMfreq, sampleClock, sampleEmuRout, sampleEmuSilence(), and udword.

Referenced by emuEngine::resetSampleEmu(), sampleEmuInit(), and sidEmu::sidEmuReset().

sbyte Sample::sampleEmuSilence  )  [private]
 

Definition at line 281 of file samples.cpp.

References sbyte.

Referenced by GalwayInit(), GalwayReturnSample(), Sample(), sampleEmuReset(), and sampleEmuTryStopAll().

void Sample::sampleEmuTryStopAll  )  [inline, private]
 

Definition at line 286 of file samples.cpp.

References sampleChannel::Active, ch4, ch5, sampleEmuRout, and sampleEmuSilence().

Referenced by sampleEmuCheckForInit().

sbyte Sample::sampleEmuTwo  )  [private]
 

Definition at line 354 of file samples.cpp.

References sampleChannel::Active, ch4, ch5, channelProcess(), sampleConvertTab, sbyte, and sampleChannel::VolShift.

Referenced by sampleEmuCheckForInit().


Member Data Documentation

ubyte* Sample::c64mem1 [private]
 

pointer to 64KB C64-RAM owned by C6510

Definition at line 102 of file samples.h.

Referenced by channelProcess(), GetNextFour(), and Sample().

ubyte* Sample::c64mem2 [private]
 

pointer to Basic-ROM, VIC, SID, I/O, Kernal-ROM owned by C6510

Definition at line 103 of file samples.h.

Referenced by channelFree(), channelTryInit(), GalwayInit(), Sample(), sampleEmuCheckForInit(), and sampleEmuReset().

sampleChannel Sample::ch4 [private]
 

Definition at line 97 of file samples.h.

Referenced by GalwayInit(), GalwayReturnSample(), GetNextFour(), sampleEmu(), sampleEmuCheckForInit(), sampleEmuReset(), sampleEmuTryStopAll(), and sampleEmuTwo().

sampleChannel Sample::ch5 [private]
 

Definition at line 97 of file samples.h.

Referenced by sampleEmuCheckForInit(), sampleEmuReset(), sampleEmuTryStopAll(), and sampleEmuTwo().

ubyte Sample::galwayNoiseTab2[64*16] [private]
 

Definition at line 98 of file samples.h.

Referenced by GalwayReturnSample(), and sampleEmuInit().

friend Sample::Mixer [private]
 

Definition at line 62 of file samples.h.

udword Sample::sampleClock [private]
 

Definition at line 96 of file samples.h.

Referenced by channelTryInit(), GetNextFour(), and sampleEmuReset().

sbyte(Sample::* Sample::sampleEmuRout)() [private]
 

function pointer to the sampler routine

Referenced by Mixer::fill16bitMono(), Mixer::fill16bitMonoControl(), Mixer::fill16bitsplit(), Mixer::fill16bitStereo(), Mixer::fill16bitStereoControl(), Mixer::fill16bitStereoSurround(), Mixer::fill8bitMono(), Mixer::fill8bitMonoControl(), Mixer::fill8bitsplit(), Mixer::fill8bitStereo(), Mixer::fill8bitStereoControl(), Mixer::fill8bitStereoSurround(), GalwayInit(), GalwayReturnSample(), Sample(), sampleEmuCheckForInit(), sampleEmuReset(), and sampleEmuTryStopAll().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:33:59 2005 for Esidplay by doxygen 1.3.3