Commit graph

35 commits

Author SHA1 Message Date
JetSetIlly cd2a00d4ba logger.Log() and logger.Logf() now require a logger.Permission instance
the logger.Permission interface indicates whether the environment making
the logging request is allowed to create new log entries. the
environment.Environment type satisifies the Permission interface

logger.Allow is provided as a convienient way of indicating the the log
entry should always be created
2024-04-30 11:23:40 +01:00
JetSetIlly 3aa5885ebe removed curated pacakge. replaced with wrapped errors
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
2023-02-13 21:58:39 +00:00
JetSetIlly 896436f2e6 refined stereo effect 2023-01-31 18:52:17 +00:00
JetSetIlly 4bdc0925e3 wav encoder outputs 16bit values 2022-12-25 09:34:38 +00:00
JetSetIlly 1e50cc3098 audio in playmode can be muted separate from debugger mute state
preference window indicates current playmode mute state in both the
playmode tab and VCS tab (audio section). added debugger mute state to
the VCS tab also

more care taken over clearing SDL audio queue when muting

CTRL+m will toggle mute for the current playmode
2022-05-12 11:58:29 +01:00
JetSetIlly 89191d9a5a clarified some preferences concepts
set defaults for revisions, rewind and ARM tabs of the prefs window (in
addition to the CRT tab). set defaults button labelled appropriately

fixes some race conditions caused by pre/post hooks on prefs values -
prefs values are generally goroutine safe, except when pre/post hook is
defined
2021-12-05 20:17:43 +00:00
JetSetIlly 883fcb6f7c SDL audio device flushed on mute change
because of how we mute (sdl.PauseAudioDevice()) there was a small bug
in the following scenario:

    playmode (with rom producing audio) -> debugger (muted audio) -> change rom -> playmode

the final packet of audio data from the first ROM could be heard when
switching back to playmode

increased audio mix volume slightly

debugger audio is muted by default
2021-11-20 15:41:43 +00:00
JetSetIlly 66abac33ae changed how realtime audio demand is handled 2021-10-28 12:24:54 +01:00
JetSetIlly ac8440e8c2 altered audio realtime demand 2021-10-25 18:17:16 +01:00
JetSetIlly df7dd96e0f added realtime audio mixer interface in addition to the existing audio interface
sdlaudio added to the television as a realtime audio mixer. television
implementation altered to handle realtime audio.

audio is better than what it was but still room for improvement I think.
2021-10-24 22:23:19 +01:00
JetSetIlly e5bd938b41 renamed paths package to resources package
ResourcePath() is now called JoinPath()

UniqueFilename() moved to a new package named unique and renamed to
Filename()
2021-10-03 13:32:08 +01:00
JetSetIlly 0025d2ee3a refined how ResourcePath in paths package works
now works more like the standard filepath.Join() function
2021-10-03 13:32:08 +01:00
JetSetIlly 67161ebad5 small tidy up after recent changes to sdlaudio package 2021-09-21 06:36:59 +01:00
JetSetIlly b060c2458c added stereo separation (including preferences) 2021-09-15 22:10:36 +01:00
JetSetIlly a1bd36c677 added audio preferences to prefs window 2021-09-15 18:53:48 +01:00
JetSetIlly 2a6cb49741 audio mixing is now a separate pacakge
TIA now puts both audio channels in the SignalAttributes separately

it is up to television.AudioMixer implementions to mix the two
channels as required
2021-09-15 18:53:48 +01:00
JetSetIlly 648da0fab8 audio generation mixes volumes of the two channels correctly
using Chris Brenner's research found in "TIA Sounding Off In The Digital
Domain"

this fixes the subtleties in the sound of Ms PacMan, for example
2021-09-07 08:01:40 +01:00
JetSetIlly 9a8019d654 SetAudio() in AudioMixer interface now expects a slice of SignalAttributes
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
2021-09-02 14:59:34 +01:00
JetSetIlly 2e94d1fb00 mute audio in debugger 2021-03-06 11:22:49 +00:00
JetSetIlly d4f72c3b40 Logf() function in logger package
replaced all instances of logger.Log() that used fmt.Sprintf() to build
the details argument
2021-03-06 08:01:48 +00:00
JetSetIlly 510c155989 clarified (and corrected) reset procedures 2021-01-14 12:37:38 +00:00
JetSetIlly 7e18cbbfb8 improved video performance
screen will buffer a small number of frames it can use to smooth out
variations in the speed at which frames come from the emulation

results in better synchronisation for flicker kernels
2020-11-24 23:29:51 +00:00
JetSetIlly 9e159b97d8 added more linters to golangci-lint config
godot --fix has been run to make sure all comments end in a full-stop

specified nolint directive to apply to specific linter
2020-10-16 16:31:07 +01:00
JetSetIlly b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +01:00
JetSetIlly 81b5a84a0b simplifed code (golangci-lint -E gosimple) 2020-10-15 20:56:48 +01:00
JetSetIlly ebae4c2c94 better audio. silence detector is no longer required
fixes H.E.R.O in particular (some effects weren't audible)
2020-09-20 11:40:20 +01:00
JetSetIlly a2aee094a0 added logger package
small changes to how terminal prompt is used

reworked terminal print styles for clarity
2020-08-03 23:24:39 +01:00
JetSetIlly a647141b41 corrected 114 divisor so that audio is correct for full speed emulation
better clipping and filling when audio buffer overruns and underruns
2020-08-03 11:30:27 +01:00
JetSetIlly 298a5d343f updated copyright notice in all files
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.
2020-07-26 20:18:56 +01:00
JetSetIlly 4d6bc0d3ad improvements to playmode video/audio
triple buffering of screen pixels to help VSYNC

simpler SDL audio. same effect (filling in for buffer underrins) but
more consistent and more simply implemented.

tweaked vignette CRT effect
2020-07-15 17:14:56 +01:00
JetSetIlly 03ce5fc4d3 repeat audio buffer if new buffer not ready
not perfect but it seems to improve sound when running below required
framerate
2020-04-11 09:46:59 +01:00
JetSetIlly b039b59017 removed PauseAudio() and FlushAudio() from AudioMixer 2020-03-30 15:17:56 +01:00
Robin Eklind 24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
steve c138f255c0 silence detector
prevents audible clicks on audio buffer underflows
2020-02-08 12:20:48 +00:00
steve e7ad0e1316 sdlwindows package renamed to sdlimgui
better reflects what it is

split sdlaudio from sdlplay package

reused in other sdl based packages (ie. sdlimgui)
2020-02-08 07:55:14 +00:00