mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-06 22:54:26 +01:00
Extra check when disabling looping
This commit is contained in:
parent
131340882b
commit
00bec4bd70
@ -545,7 +545,8 @@ VGMSTREAM * init_vgmstream_from_STREAMFILE(STREAMFILE *streamFile) {
|
|||||||
return init_vgmstream_internal(streamFile);
|
return init_vgmstream_internal(streamFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset a VGMSTREAM to its state at the start of playback.
|
/* Reset a VGMSTREAM to its state at the start of playback
|
||||||
|
* (when a plugin needs to seek back to zero, for instance).
|
||||||
* Note that this does not reset the constituent STREAMFILES. */
|
* Note that this does not reset the constituent STREAMFILES. */
|
||||||
void reset_vgmstream(VGMSTREAM * vgmstream) {
|
void reset_vgmstream(VGMSTREAM * vgmstream) {
|
||||||
/* copy the vgmstream back into itself */
|
/* copy the vgmstream back into itself */
|
||||||
@ -924,7 +925,7 @@ void vgmstream_force_loop(VGMSTREAM* vgmstream, int loop_flag, int loop_start_sa
|
|||||||
vgmstream->loop_ch = calloc(vgmstream->channels,sizeof(VGMSTREAMCHANNEL));
|
vgmstream->loop_ch = calloc(vgmstream->channels,sizeof(VGMSTREAMCHANNEL));
|
||||||
/* loop_ch will be populated when decoded samples reach loop start */
|
/* loop_ch will be populated when decoded samples reach loop start */
|
||||||
}
|
}
|
||||||
else {
|
else if (!loop_flag && vgmstream->loop_flag) {
|
||||||
/* not important though */
|
/* not important though */
|
||||||
free(vgmstream->loop_ch);
|
free(vgmstream->loop_ch);
|
||||||
vgmstream->loop_ch = NULL;
|
vgmstream->loop_ch = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user