mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
cleanup: misc
This commit is contained in:
parent
9c641c0dc1
commit
e607b03284
@ -642,7 +642,7 @@ static size_t get_table_frame_size(opus_io_data* data, int frame) {
|
|||||||
static size_t custom_opus_get_samples(off_t offset, size_t stream_size, STREAMFILE* sf, opus_type_t type) {
|
static size_t custom_opus_get_samples(off_t offset, size_t stream_size, STREAMFILE* sf, opus_type_t type) {
|
||||||
size_t num_samples = 0;
|
size_t num_samples = 0;
|
||||||
off_t end_offset = offset + stream_size;
|
off_t end_offset = offset + stream_size;
|
||||||
int packet = 0;
|
//int packet = 0;
|
||||||
|
|
||||||
if (end_offset > get_streamfile_size(sf)) {
|
if (end_offset > get_streamfile_size(sf)) {
|
||||||
VGM_LOG("OPUS: wrong end offset found\n");
|
VGM_LOG("OPUS: wrong end offset found\n");
|
||||||
@ -699,7 +699,7 @@ static size_t custom_opus_get_samples(off_t offset, size_t stream_size, STREAMFI
|
|||||||
num_samples += packet_samples;
|
num_samples += packet_samples;
|
||||||
|
|
||||||
offset += skip_size + data_size;
|
offset += skip_size + data_size;
|
||||||
packet++;
|
//packet++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return num_samples;
|
return num_samples;
|
||||||
|
@ -43,7 +43,7 @@ void vgm_log_set_callback(void* ctx_p, int level, int type, void* callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void log_internal(void* ctx_p, int level, const char* fmt, va_list args) {
|
static void log_internal(void* ctx_p, int level, const char* fmt, va_list args) {
|
||||||
char line[255];
|
char line[256];
|
||||||
int out;
|
int out;
|
||||||
logger_t* ctx = ctx_p;
|
logger_t* ctx = ctx_p;
|
||||||
if (!ctx) ctx = &log_impl;
|
if (!ctx) ctx = &log_impl;
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
#ifndef _LIMITS_H
|
#ifndef _VGMSTREAM_LIMITS_H
|
||||||
#define _LIMITS_H
|
#define _VGMSTREAM_LIMITS_H
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/* Windows generally only allows 260 chars in path, but other OSs have higher limits, and we handle
|
/* Keep path limit within a reasonable stack size.
|
||||||
* UTF-8 (that typically uses 2-bytes for common non-latin codepages) plus player may append protocols
|
* Windows generally only allows 260 chars in path, but other OSs have higher limits and we handle
|
||||||
* to paths, so it should be a bit higher. Most people wouldn't use huge paths though. */
|
* UTF-8 (that typically uses 2-bytes for common non-latin codepages), plus player may append protocols
|
||||||
|
* to paths. Most people wouldn't use huge paths though. */
|
||||||
PATH_LIMIT = 4096, /* (256 * 8) * 2 = ~max_path * (other_os+extra) * codepage_bytes */
|
PATH_LIMIT = 4096, /* (256 * 8) * 2 = ~max_path * (other_os+extra) * codepage_bytes */
|
||||||
STREAM_NAME_SIZE = 255,
|
|
||||||
VGMSTREAM_MAX_CHANNELS = 64,
|
STREAM_NAME_SIZE = 256, /* usually small but may need to concat multiple names */
|
||||||
VGMSTREAM_MIN_SAMPLE_RATE = 300, /* 300 is Wwise min */
|
VGMSTREAM_MAX_CHANNELS = 64, /* +40ch multilayers */
|
||||||
VGMSTREAM_MAX_SAMPLE_RATE = 192000, /* found in some FSB5 */
|
VGMSTREAM_MIN_SAMPLE_RATE = 300, /* 300 is Wwise min */
|
||||||
VGMSTREAM_MAX_SUBSONGS = 65535, /* +20000 isn't that uncommon */
|
VGMSTREAM_MAX_SAMPLE_RATE = 192000, /* found in some FSB5 */
|
||||||
|
VGMSTREAM_MAX_SUBSONGS = 65535, /* +20000 isn't that uncommon */
|
||||||
VGMSTREAM_MAX_NUM_SAMPLES = 1000000000, /* no ~5h vgm hopefully */
|
VGMSTREAM_MAX_NUM_SAMPLES = 1000000000, /* no ~5h vgm hopefully */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user