1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-12 06:06:30 +00:00
Commit Graph

55 Commits

Author SHA1 Message Date
Thomas Harte
2e15fab651 Doubles down on <cX> over <X.h> for C includes, and usage of the namespace for those types and functions. 2017-11-11 15:28:40 -05:00
Thomas Harte
2203499215 Enables -Wreorder and corrects a few of the more trivial fixes thereby suggested. 2017-11-09 22:14:22 -05:00
Thomas Harte
c0055a5a5f Further builds up SConstruct, correcting many missed imports and a couple of improper uses of C99 in C++ code. 2017-11-09 22:04:49 -05:00
Thomas Harte
512e877d06 Ensures proper initialisation of the delegate pointer. 2017-11-05 20:11:18 -05:00
Thomas Harte
c13f8e5390 Corrects a couple of cast conversion errors. 2017-10-21 22:42:19 -04:00
Thomas Harte
ad9df4bb90 Commutes uint8_t *, uint16_t *, uint32_t *, size_t, off_t and long to functional-style casts. 2017-10-21 22:30:15 -04:00
Thomas Harte
5e3e91373a Switches all unsigned int and double casts to functional style. 2017-10-21 19:49:04 -04:00
Thomas Harte
131b340d75 Dodges a lambda copy. 2017-08-22 21:55:10 -04:00
Thomas Harte
633d8965e2 Removed accidental logging commit. 2017-08-02 07:38:14 -04:00
Thomas Harte
bda9441620 Made an attempt to clock the AY. 2017-08-02 07:20:59 -04:00
Thomas Harte
4abd62e62b Standardises on const [Half]Cycles as the thing called and returned, rather than const [Half]Cycles & as it's explicitly defined to be only one int in size, so using a reference is overly weighty. 2017-07-27 22:05:29 -04:00
Thomas Harte
8361756dc4 Switched definitively to the works-for-now approach of requiring an explicit opt-in where somebody wants to clock a whole-cycle receiver from a half-cycle clock. 2017-07-27 07:40:02 -04:00
Thomas Harte
75d67ee770 Relocated ClockReceiver.hpp as it's a dependency for parts of the static analyser, and therefore needs to be distinct from the actual emulation parts. 2017-07-25 20:20:55 -04:00
Thomas Harte
b7f88e8f61 Filter is now a ClockReciever, affecting all sound output devices. 2017-07-24 21:29:13 -04:00
Thomas Harte
92d1dd9a4a Attempts to eliminate all remaining type variations. 2017-07-21 21:54:05 -04:00
Thomas Harte
449c33ee8b Signedness fixes. 2017-07-21 21:28:04 -04:00
Thomas Harte
279f4760d7 Eliminated buffer_size_ as something explicitly stored, and reduced size of delegate call out. 2017-07-16 15:01:39 -04:00
Thomas Harte
f931cd582d Switched to use of std::vector in those few remaining places where I was still using a unique_ptr to a native type and newing for myself. So, some of my earliest bits of code. 2017-07-16 13:54:07 -04:00
Thomas Harte
e01f3f06c8 Completed curly bracket movement. 2017-03-26 14:34:47 -04:00
Thomas Harte
026b418b4a Ensured filtered 1:1 audio resampling is applied. 2017-02-28 21:27:38 -05:00
Thomas Harte
c5016a3eaa Completed flight of 'Outputs' to postfix underscores. 2016-12-03 11:02:34 -05:00
Thomas Harte
9c550c594a Moved audio work back into its own thread, but this time it queues up an all happens only upon a flush. Hopefully to resolve synchronisation cost concerns. 2016-11-09 21:17:50 -05:00
Thomas Harte
eccfdabeab Temporarily disabled thread hop, until I can find a way to batch these things. 2016-11-03 22:52:02 -04:00
Thomas Harte
4258401384 Implemented flush, added a call to it from the filter speaker's destructor, to ensure no race conditions on accessing the various bits of instance state there and below. 2016-10-19 21:15:04 -04:00
Thomas Harte
00e3ad9b04 Added a bit more ceiling for lowpass filtering on constrained machines. 2016-10-10 07:51:01 -04:00
Thomas Harte
e53455a936 Not having read the C++ synchronisation primitives before, this async task queue is probably incorrect. But nevertheless, let's have a quick go at employing it — in a hideously thread unsafe fashion — for audio generation. What can possibly go wrong? 2016-10-07 16:56:34 -04:00
Thomas Harte
dab3580111 Experimental: can I afford a lower sampling rate if there's a low-pass filter in effect? 2016-08-22 22:18:05 -04:00
Thomas Harte
1541273785 Moved responsibility for throwing in a low-pass filter up to the Vic, appropriately. 2016-08-21 18:13:31 -04:00
Thomas Harte
c783090980 It turns out that the Vic has a 1.6Khz low-pass filter. So added that. 2016-08-21 12:13:41 -04:00
Thomas Harte
fef316932f Moved opening bracket appropriately. 2016-07-04 21:14:28 -04:00
Thomas Harte
8db44eed3e Added a default implementation of Speaker::skip_samples. 2016-07-04 20:48:27 -04:00
Thomas Harte
ed8f4d0476 Added some minor additional bits of documentation. 2016-06-30 08:46:29 -04:00
Thomas Harte
2bd71e7e9b .reset is the more normal way to reassign a unique_ptr. 2016-06-23 20:52:44 -04:00
Thomas Harte
fcf4b14344 Extended to allow floating-point sampling rates. Which makes sense. 2016-06-13 19:30:41 -04:00
Thomas Harte
1e0fcbbee8 Made a very basic stab at a couple of the tone generators, added straight-through path for the speaker when input rate exactly equals output rate. 2016-06-01 19:53:16 -04:00
Thomas Harte
5c4f35e13f Finally started on generalising the C++ stuff so as to be able to be able to get a working audio binding on the OS-specific side without further repetition by factoring an appropriate protocol out from the Electron and sketching out the correct speaker class for the Atari. Added a method to ask it what a good output frequency would be. 2016-05-31 21:23:44 -04:00
Thomas Harte
5980f5e991 Number of taps can be specified explicitly if you desire. 2016-04-17 20:45:57 -04:00
Thomas Harte
499f7ace07 Re-enabled working video output for the Electron for the day and consolidated the rough metric I'm using to pick a number of taps for the audio filter. 2016-04-17 20:43:20 -04:00
Thomas Harte
6a17c2992d Introduced a compile-time configurable audio divider, set it arbitrarily to '8' for now. Discovered why my graphics aren't centred and added a TODO. 2016-04-13 22:31:59 -04:00
Thomas Harte
ca35a7e222 Ensured that a much greater input rate than output is handled correctly. 2016-03-16 20:38:17 -04:00
Thomas Harte
4cd0aa3416 Completed FIR filter based audio output. 2016-03-15 23:37:35 -04:00
Thomas Harte
726c98446a Fixed a couple of memory leaks, at least got as far as instantiating a filter. 2016-03-15 21:34:00 -04:00
Thomas Harte
0efe4b312c Disabled my various bits of rate interchange debugging; improved test for when to call update_display due to a RAM write. 2016-01-21 22:16:52 -05:00
Thomas Harte
e65cd4cf06 Some data is marginally reaching the CPU from the tape. 2016-01-19 22:05:34 -05:00
Thomas Harte
ddcc34740b Added lots of debugging output while I attempt to locate the source of audio scratchiness, also simplified manner of dealing with wraparound within the AudioQueue wrapper. 2016-01-18 13:50:19 -06:00
Thomas Harte
b58e59e2bb Fixed: now outputting the requested output rate, rather than massively overproducing at the input rate. 2016-01-14 23:12:40 -05:00
Thomas Harte
383b2be4c6 Fixed one off-by-one error. 2016-01-14 21:33:27 -05:00
Thomas Harte
8bd04a6be4 Switched model for filter subclasses. Implemented test square[-ish] wave to check for obvious stream errors. None is clear. 2016-01-14 21:27:02 -05:00
Thomas Harte
38ffcaa262 Here, at last, is _some_ audio output, at least. 2016-01-14 20:33:22 -05:00
Thomas Harte
afde8dac49 Closed the loop such that audio manages to bubble up into Objective-C. 2016-01-13 22:38:59 -05:00