-
Notifications
You must be signed in to change notification settings - Fork 1
/
tape.h
81 lines (57 loc) · 2.23 KB
/
tape.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* tape.h: tape handling routines
Copyright (c) 1999-2004 Philip Kendall
$Id: tape.h 3714 2008-07-06 18:10:29Z fredm $
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Author contact information:
E-mail: [email protected]
*/
#ifndef FUSE_TAPE_H
#define FUSE_TAPE_H
#include <libspectrum.h>
int tape_init( void );
int tape_open( const char *filename, int autoload );
int
tape_read_buffer( unsigned char *buffer, size_t length, libspectrum_id_t type,
const char *filename, int autoload );
int tape_close( void );
int tape_select_block( size_t n );
int tape_select_block_no_update( size_t n );
int tape_get_current_block( void );
int tape_write( const char *filename );
int tape_can_autoload( void );
int tape_load_trap( void );
int tape_save_trap( void );
int tape_do_play( int autoplay );
int tape_toggle_play( int autoplay );
void tape_next_edge( libspectrum_dword last_tstates, int type,
void *user_data );
int tape_stop( void );
int tape_is_playing( void );
int tape_present( void );
int tape_record_start( void );
int tape_record_stop( void );
/* Call a user-supplied function for every block in the current tape */
int
tape_foreach( void (*function)( libspectrum_tape_block *block,
void *user_data),
void *user_data );
/* Fill 'buffer' with up a maximum of 'length' characters of
information about 'block' */
int tape_block_details( char *buffer, size_t length,
libspectrum_tape_block *block );
extern int tape_microphone;
extern int tape_modified;
extern int tape_playing;
extern int tape_recording;
extern int tape_edge_event;
#endif