If you have an issue with any of our projects. feel free to register.

Commit 4eb7a3ee authored by Christopher Snowhill's avatar Christopher Snowhill

Update VGMStream plugin with new API changes a bit, and now force auto downmixing to 6ch

parent bb38853e
......@@ -28,6 +28,7 @@
@interface VGMDecoder : NSObject <CogDecoder> {
VGMSTREAM *stream;
BOOL playForever;
int sampleRate;
int channels;
int bitrate;
......
......@@ -198,12 +198,27 @@
if ( !stream )
return NO;
vgmstream_mixing_autodownmix(stream, 6);
playForever = IsRepeatOneSet();
sampleRate = stream->sample_rate;
channels = stream->channels;
totalFrames = get_vgmstream_play_samples( 2.0, 10.0, 10.0, stream );
framesFade = stream->loop_flag ? sampleRate * 10 : 0;
framesLength = totalFrames - framesFade;
vgmstream_cfg_t vcfg = {0};
vcfg.allow_play_forever = 1;
vcfg.play_forever = playForever;
vcfg.loop_count = 2;
vcfg.fade_time = 10;
vcfg.fade_delay = 0;
vcfg.ignore_loop = 0;
vgmstream_apply_config(stream, &vcfg);
framesRead = 0;
bitrate = get_vgmstream_average_bitrate(stream);
......@@ -232,6 +247,11 @@
{
BOOL repeatone = IsRepeatOneSet();
if (repeatone != playForever) {
playForever = repeatone;
vgmstream_set_play_forever(stream, repeatone);
}
BOOL loopokay = repeatone && stream->loop_flag;
if (!loopokay) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment