television signal split into video and audio signal. The audio signal is
only sent then a new sample from the TIA is ready
realtime mixer concept change. the mixer can be informed of a change of
TV spec. this allows the realtime mixer to make an informed judgement
about the required sample rate
the sample rate is unlikely to be ideal however unless the number of
scanlines in the TV image is the same as given in the basic TV
specification (ie. 262 lines for NTSC, 312 for PAL). because of that,
the realtime mixer can also indirectly regulate the rate of calls to
SetAudio(). the Regulate() function is called by the television which
then alters the call frequency to SetAudio() depending on the regulate
value. this effectively keeps the audio buffer nicely filled - neither
too long which would be audibly laggy, or too short which would result
in clipped audio
the values that control the regulation in both the sdlaudio package and
television package will need tweaking to find the best values
curated package predated the standard errors package introduced in
go1.13
the standard package does a better job of what curated attempted to do
the change of package also gave me a opportunity to clean up the error
messages a little bit
go-wav, statsview and memviz all indirectly used gopkg.in/yaml.v3 which
I do not want to depend upon
WAV functionality is no longer available for wav writing or reading
(supercharger tapes). will try to reintroduce functionality in the
future
TIA now puts both audio channels in the SignalAttributes separately
it is up to television.AudioMixer implementions to mix the two
channels as required
This allows a single call to SetAudio() and for the loop to happen
inside that function - as opposed to looping over the slice and calling
SetAudio() multiple times
removed all messages from errors package. the strings are now hard coded
in place. the original reason for extracting the error strings like that
was (a) for redundancy and (b) for localisation possibilities. However,
in reality there is not much redundancy and since the project started
the scope of localisation is much larger (particularly due to the
addition of a GUI)
this is the first step. the next step is to remove the errors package
altogether. recent additions to Go mean that the functionality of the
errors package is no longer required. moreover, the original idea for
the errors package functions turns out not to have been as useful as
first appeared (the Error() functionality which makes sure no repeating
sub-strings occur is probably better achieved with static tooling).
one idea that comes from this which is quite interesting is the idea of
a curated error. that is, any error that has been "wrapped" as some
'generic' type. the IsAny() function in the errors package effectively
serves this purpose. we use that in one place in the input loop of the
debugger. not strictly necessary but nice to have so it would ideal
if we could remove the errors package but keep that idea.
the note about historical versions also being covered wasn't strictly
needed and was ugly. the LICENCE being in the root file from the very
first commit is sufficient.
removed fixes previously added to account for Pitfall silences. caused
problems with other ROMs, particularly chiphead demo
added option to PLAY mode that presets window to use overscan area.
prevents excessive window resizing when overscan use is detected.
commentary fixes
- reworked polycounter to make it easier to generate polycounters of
different bit lengths
o tia/audio
- commented code
o wavwriter
- now saves correctly with correct samplerate
- implemented audio
- using Ron Fries' method as the basis
- removed sample playback - performance of Fries' method is good
enough that we'll never need it again
- sdl audio routines using QueueAudio() - maybe better if we use
callbacks?
- sketched wavwriter AudioMixer - not usable yet