static int x1_handle_tap(INT16* buffer, const UINT8* casdata) { int sample_count = 0; int data_pos = new_format ? 0x28 : 0x04; if (samplerate != 8000) { LOG_FORMATS("TAP: images that are not 8000Hz are not yet supported\n"); return -1; } while (sample_count < cas_size) { sample_count += x1_fill_wave(buffer, casdata[data_pos], sample_count); data_pos++; } return sample_count; }
static int x1_handle_tap(INT16* buffer, const UINT8* casdata) { int sample_count = 0; int data_pos = 0x28; if(memcmp(casdata, "TAPE",4)) // header check { LOG_FORMATS("TAP: image is not a 'new' format TAP image\n"); return -1; } if(samplerate != 8000) { LOG_FORMATS("TAP: images that are not 8000Hz are not yet supported\n"); return -1; } while(sample_count < cas_size) { sample_count += x1_fill_wave(buffer,casdata[data_pos],sample_count); data_pos++; } return sample_count; }