mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-26 10:49:17 +00:00
audio: remove dc bias
This commit is contained in:
parent
dd070f71fc
commit
d4873545b2
@ -395,10 +395,11 @@ export var SampleAudio = function(clockfreq) {
|
||||
self.sr=self.context.sampleRate;
|
||||
self.bufferlen=2048;
|
||||
|
||||
// Amiga 500 fixed filter at 6kHz. WebAudio lowpass is 12dB/oct, whereas
|
||||
// older Amigas had a 6dB/oct filter at 4900Hz.
|
||||
// remove DC bias
|
||||
self.filterNode=self.context.createBiquadFilter();
|
||||
self.filterNode.frequency.value=6000;
|
||||
self.filterNode.type='lowshelf';
|
||||
self.filterNode.frequency.value=100;
|
||||
self.filterNode.gain.value=-6;
|
||||
|
||||
// mixer
|
||||
if ( typeof self.context.createScriptProcessor === 'function') {
|
||||
|
@ -27,7 +27,7 @@ const vsyncFrequency = hsyncFrequency / 0x148;
|
||||
const cpuCyclesPerLine = cpuFrequency / hsyncFrequency;
|
||||
const timerFrequency = 500; // input 2 bit 0x8
|
||||
const cyclesPerTimerTick = cpuFrequency / (2 * timerFrequency);
|
||||
const audioOversample = 4;
|
||||
const audioOversample = 2;
|
||||
const audioSampleRate = 60 * scanlinesPerFrame; // why not hsync?
|
||||
|
||||
export class VicDual extends BasicScanlineMachine {
|
||||
|
Loading…
Reference in New Issue
Block a user