mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +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.sr=self.context.sampleRate;
|
||||||
self.bufferlen=2048;
|
self.bufferlen=2048;
|
||||||
|
|
||||||
// Amiga 500 fixed filter at 6kHz. WebAudio lowpass is 12dB/oct, whereas
|
// remove DC bias
|
||||||
// older Amigas had a 6dB/oct filter at 4900Hz.
|
|
||||||
self.filterNode=self.context.createBiquadFilter();
|
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
|
// mixer
|
||||||
if ( typeof self.context.createScriptProcessor === 'function') {
|
if ( typeof self.context.createScriptProcessor === 'function') {
|
||||||
|
@ -27,7 +27,7 @@ const vsyncFrequency = hsyncFrequency / 0x148;
|
|||||||
const cpuCyclesPerLine = cpuFrequency / hsyncFrequency;
|
const cpuCyclesPerLine = cpuFrequency / hsyncFrequency;
|
||||||
const timerFrequency = 500; // input 2 bit 0x8
|
const timerFrequency = 500; // input 2 bit 0x8
|
||||||
const cyclesPerTimerTick = cpuFrequency / (2 * timerFrequency);
|
const cyclesPerTimerTick = cpuFrequency / (2 * timerFrequency);
|
||||||
const audioOversample = 4;
|
const audioOversample = 2;
|
||||||
const audioSampleRate = 60 * scanlinesPerFrame; // why not hsync?
|
const audioSampleRate = 60 * scanlinesPerFrame; // why not hsync?
|
||||||
|
|
||||||
export class VicDual extends BasicScanlineMachine {
|
export class VicDual extends BasicScanlineMachine {
|
||||||
|
Loading…
Reference in New Issue
Block a user