diff options
author | 2016-08-20 19:59:04 -0400 | |
---|---|---|
committer | 2016-08-20 19:59:04 -0400 | |
commit | d1227cb38f2a943fbaf7152bd1b7d9ab946609b5 (patch) | |
tree | cb650bd84857250710aefe3ad63938c7da62e6ec /src/lib/formats/adam_cas.cpp | |
parent | 02b9749216c061ab7f648d363585e30c07a64af5 (diff) |
casserr_t ==> enum class cassette_image::error
Diffstat (limited to 'src/lib/formats/adam_cas.cpp')
-rw-r--r-- | src/lib/formats/adam_cas.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/formats/adam_cas.cpp b/src/lib/formats/adam_cas.cpp index 644be2cd0cc..30deb27a1a9 100644 --- a/src/lib/formats/adam_cas.cpp +++ b/src/lib/formats/adam_cas.cpp @@ -50,19 +50,19 @@ Data is phase encoded, with 70us bit cells with a transition at 31us for a 1 and ****************************************************************/ -static casserr_t coladam_ddp_identify ( cassette_image *cass, struct CassetteOptions *opts ) +static cassette_image::error coladam_ddp_identify ( cassette_image *cass, struct CassetteOptions *opts ) { opts -> bits_per_sample = 16; opts -> channels = 2; opts -> sample_frequency = 44100; - return CASSETTE_ERROR_SUCCESS; + return cassette_image::error::SUCCESS; } // Store byte of data -casserr_t coladam_put_byte(cassette_image *cass, int channel, double *time_index, int byte, int *prev_sign) +cassette_image::error coladam_put_byte(cassette_image *cass, int channel, double *time_index, int byte, int *prev_sign) { - casserr_t err = CASSETTE_ERROR_SUCCESS; + cassette_image::error err = cassette_image::error::SUCCESS; for (int i = 0; i < 8; i++) { if(byte & 0x80) @@ -83,11 +83,11 @@ casserr_t coladam_put_byte(cassette_image *cass, int channel, double *time_index return err; } -casserr_t coladam_put_block(cassette_image *cass, int channel, double *time_index, int *prev_sign, int block_index, UINT8 *buffer, int layout_type) +cassette_image::error coladam_put_block(cassette_image *cass, int channel, double *time_index, int *prev_sign, int block_index, UINT8 *buffer, int layout_type) { int i, checksum_16=0; UINT8 header[] = { 0x16, 0x48, 0x45, 0x00, static_cast<UINT8>(block_index), 0xff, static_cast<UINT8>(0xff - block_index), 0x00, 0x80, 0xf4 }; - casserr_t err; + cassette_image::error err; if (layout_type == TYPE_GW) { header[1] = 0x47; @@ -126,12 +126,12 @@ casserr_t coladam_put_block(cassette_image *cass, int channel, double *time_inde } -static casserr_t coladam_ddp_load( cassette_image *cass ) +static cassette_image::error coladam_ddp_load( cassette_image *cass ) { double time = 0.; int i, block, prev_sign=-1; UINT8 buffer[0x400]; - casserr_t err = CASSETTE_ERROR_SUCCESS; + cassette_image::error err = cassette_image::error::SUCCESS; // It would appear that data packs that originally had the type GW data layout and headers work fine when converted to type // HE. Thus we set all tapes to type HE. |