C# Class NScumm.Core.Audio.SoftSynth.SID

Inheritance: ISid
显示文件 Open project: scemino/nscumm Class Usage Examples

Private Properties

Property Type Description
Output int
Read int
UpdateClock void

Public Methods

Method Description
Reset ( ) : void
SID ( )
SetSamplingParameters ( double clock_freq, double sample_freq, double pass_freq = -1, double filter_scale = 0.97 ) : bool

Setting of SID sampling parameters.

Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. The default end of passband frequency is pass_freq = 0.9*sample_freq/2 for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample frequencies. For resampling, the ratio between the clock frequency and the sample frequency is limited as follows: 125*clock_freq/sample_freq < 16384 E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not be set lower than ~ 8kHz. A lower sample frequency would make the resampling code overfill its 16k sample ring buffer. The end of passband frequency is also limited: pass_freq <= 0.9*sample_freq/2 E.g. for a 44.1kHz sampling rate the end of passband frequency is limited to slightly below 20kHz. This constraint ensures that the FIR table is not overfilled.

UpdateClock ( int &delta_t, short buf, int n, int offset, int interleave = 1 ) : int

SID clocking with audio sampling. Fixpoint arithmetics is used.

Write ( int offset, int value ) : void

Private Methods

Method Description
Output ( ) : int
Read ( int offset ) : int
UpdateClock ( int delta_t ) : void

Method Details

Reset() public method

public Reset ( ) : void
return void

SID() public method

public SID ( )

SetSamplingParameters() public method

Setting of SID sampling parameters.
Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. The default end of passband frequency is pass_freq = 0.9*sample_freq/2 for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample frequencies. For resampling, the ratio between the clock frequency and the sample frequency is limited as follows: 125*clock_freq/sample_freq < 16384 E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not be set lower than ~ 8kHz. A lower sample frequency would make the resampling code overfill its 16k sample ring buffer. The end of passband frequency is also limited: pass_freq <= 0.9*sample_freq/2 E.g. for a 44.1kHz sampling rate the end of passband frequency is limited to slightly below 20kHz. This constraint ensures that the FIR table is not overfilled.
public SetSamplingParameters ( double clock_freq, double sample_freq, double pass_freq = -1, double filter_scale = 0.97 ) : bool
clock_freq double Clock freq.
sample_freq double Sample freq.
pass_freq double Pass freq.
filter_scale double Filter scale.
return bool

UpdateClock() public method

SID clocking with audio sampling. Fixpoint arithmetics is used.
public UpdateClock ( int &delta_t, short buf, int n, int offset, int interleave = 1 ) : int
delta_t int Delta t.
buf short Buffer.
n int N.
offset int Offset.
interleave int Interleave.
return int

Write() public method

public Write ( int offset, int value ) : void
offset int
value int
return void