From 54048b3407d23af7959e4f94701aba7cb1119ad8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 2 Oct 2020 02:42:28 +1000 Subject: -imagedev/cassimg.cpp: Make the interface look something like C++. -sound/tiasound.cpp: Use some vaguely C++-like code internally. --- src/lib/formats/phc25_cas.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lib/formats/phc25_cas.cpp') diff --git a/src/lib/formats/phc25_cas.cpp b/src/lib/formats/phc25_cas.cpp index 197c3db50ae..ee8864adbb5 100644 --- a/src/lib/formats/phc25_cas.cpp +++ b/src/lib/formats/phc25_cas.cpp @@ -29,10 +29,10 @@ enough to make it work. ********************************************************************/ -#include - #include "phc25_cas.h" +#include + #define WAVEENTRY_LOW -32768 #define WAVEENTRY_HIGH 32767 @@ -40,7 +40,7 @@ enough to make it work. #define PHC25_HEADER_BYTES 16 // image size -static int phc25_image_size; +static int phc25_image_size; // FIXME: global variable prevents multiple instances static int phc25_put_samples(int16_t *buffer, int sample_pos, int count, int level) { @@ -147,7 +147,7 @@ static int phc25_cassette_calculate_size_in_samples(const uint8_t *bytes, int le return phc25_handle_cassette(nullptr, bytes); } -static const struct CassetteLegacyWaveFiller phc25_legacy_fill_wave = +static const cassette_image::LegacyWaveFiller phc25_legacy_fill_wave = { phc25_cassette_fill_wave, /* fill_wave */ -1, /* chunk_size */ @@ -158,17 +158,17 @@ static const struct CassetteLegacyWaveFiller phc25_legacy_fill_wave = 0 /* trailer_samples */ }; -static cassette_image::error phc25_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts) +static cassette_image::error phc25_cassette_identify(cassette_image *cassette, cassette_image::Options *opts) { - return cassette_legacy_identify(cassette, opts, &phc25_legacy_fill_wave); + return cassette->legacy_identify(opts, &phc25_legacy_fill_wave); } static cassette_image::error phc25_cassette_load(cassette_image *cassette) { - return cassette_legacy_construct(cassette, &phc25_legacy_fill_wave); + return cassette->legacy_construct(&phc25_legacy_fill_wave); } -static const struct CassetteFormat phc25_cassette_image_format = +static const cassette_image::Format phc25_cassette_image_format = { "phc", phc25_cassette_identify, -- cgit v1.2.3-70-g09d2