Add stream index selection, to use in metas if supported by the format

Not ideal here, but it's the simplest way to pass to all
init_vgmstream_x functions without having to change all functions to
pass extra params or use globals. The value can be set externally by
plugins and metas can use to play the selected stream, or just ignore
it.
This commit is contained in:
bnnm 2017-08-12 11:23:09 +02:00
parent c5dbece5ac
commit a3146ed2f6

View File

@ -59,6 +59,12 @@ typedef struct _STREAMFILE {
size_t (*get_bytes_read)(struct _STREAMFILE *);
int (*get_error_count)(struct _STREAMFILE *);
#endif
/* Substream selection for files with multiple streams. Manually used in metas if supported.
* Not ideal here, but it's the simplest way to pass to all init_vgmstream_x functions. */
int stream_index; /* 0=default/auto (first), 1=first, N=Nth */
} STREAMFILE;
/* open file with a set buffer size, create a STREAMFILE object or return NULL if open failed */