- consolidated the different file access interfaces in the backends into one shared version.
This was getting a bit unwieldy. The include path setup is not perfect yet, that's work for later. (It's about time we're getting C++20 with modules so that this include path madness can be put to an end.)
This commit is contained in:
parent
d94b63b486
commit
7468c0f36d
28 changed files with 504 additions and 634 deletions
|
|
@ -129,24 +129,24 @@ double flt_rand()
|
|||
return (int)GenRand_Real1();
|
||||
}
|
||||
|
||||
struct timidity_file *open_file(const char *name, SoundFontReaderInterface *sfreader)
|
||||
timidity_file *open_file(const char *name, MusicIO::SoundFontReaderInterface *sfreader)
|
||||
{
|
||||
return sfreader->open_timidityplus_file(name);
|
||||
return sfreader->open_file(name);
|
||||
}
|
||||
|
||||
/* This closes files opened with open_file */
|
||||
void tf_close(struct timidity_file *tf)
|
||||
void tf_close(timidity_file *tf)
|
||||
{
|
||||
if (tf) tf->close();
|
||||
}
|
||||
|
||||
/* This is meant for skipping a few bytes. */
|
||||
void skip(struct timidity_file *tf, size_t len)
|
||||
void skip(timidity_file *tf, size_t len)
|
||||
{
|
||||
tf_seek(tf, (long)len, SEEK_CUR);
|
||||
}
|
||||
|
||||
int tf_getc(struct timidity_file *tf)
|
||||
int tf_getc(timidity_file *tf)
|
||||
{
|
||||
unsigned char c;
|
||||
auto read = tf_read(&c, 1, 1, tf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue