2008-08-02 05:15:24 +02:00
|
|
|
#include "streamfile.h"
|
2024-07-14 21:40:37 +02:00
|
|
|
#include "util/vgmstream_limits.h"
|
2023-06-25 22:02:34 +02:00
|
|
|
#include "util/sf_utils.h"
|
2008-08-02 05:15:24 +02:00
|
|
|
|
2018-01-27 13:58:46 +01:00
|
|
|
|
2021-01-03 16:07:17 +01:00
|
|
|
STREAMFILE* open_streamfile(STREAMFILE* sf, const char* pathname) {
|
|
|
|
return sf->open(sf, pathname, STREAMFILE_DEFAULT_BUFFER_SIZE);
|
2018-08-04 20:42:00 +02:00
|
|
|
}
|
|
|
|
|
2021-01-03 16:07:17 +01:00
|
|
|
STREAMFILE* reopen_streamfile(STREAMFILE* sf, size_t buffer_size) {
|
2019-01-01 23:21:08 +01:00
|
|
|
char pathname[PATH_LIMIT];
|
|
|
|
|
2021-01-03 16:07:17 +01:00
|
|
|
if (!sf) return NULL;
|
2019-10-19 11:07:28 +02:00
|
|
|
|
2019-01-01 23:21:08 +01:00
|
|
|
if (buffer_size == 0)
|
|
|
|
buffer_size = STREAMFILE_DEFAULT_BUFFER_SIZE;
|
2021-09-19 23:48:33 +02:00
|
|
|
get_streamfile_name(sf, pathname, sizeof(pathname));
|
2021-01-03 16:07:17 +01:00
|
|
|
return sf->open(sf, pathname, buffer_size);
|
2019-01-01 23:21:08 +01:00
|
|
|
}
|