Revert "VGMStream Input: Remove downmixing, add layout"
This reverts commit 0d4ee4c901
.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
parent
38969cd3b1
commit
69ebce32c0
|
@ -32,7 +32,6 @@
|
||||||
BOOL canPlayForever;
|
BOOL canPlayForever;
|
||||||
int sampleRate;
|
int sampleRate;
|
||||||
int channels;
|
int channels;
|
||||||
uint32_t channelConfig;
|
|
||||||
int bitrate;
|
int bitrate;
|
||||||
long totalFrames;
|
long totalFrames;
|
||||||
long framesRead;
|
long framesRead;
|
||||||
|
|
|
@ -63,7 +63,9 @@ static NSString *get_description_tag(const char *description, const char *tag, c
|
||||||
vgmstream_apply_config(stream, &vcfg);
|
vgmstream_apply_config(stream, &vcfg);
|
||||||
|
|
||||||
int output_channels = stream->channels;
|
int output_channels = stream->channels;
|
||||||
uint32_t channelConfig = stream->channel_layout;
|
|
||||||
|
vgmstream_mixing_autodownmix(stream, 6);
|
||||||
|
vgmstream_mixing_enable(stream, MAX_BUFFER_SAMPLES, NULL, &output_channels);
|
||||||
|
|
||||||
int track_num = [[url fragment] intValue];
|
int track_num = [[url fragment] intValue];
|
||||||
|
|
||||||
|
@ -148,21 +150,20 @@ static NSString *get_description_tag(const char *description, const char *tag, c
|
||||||
close_streamfile(tagFile);
|
close_streamfile(tagFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSDictionary *properties = @{ @"bitrate": [NSNumber numberWithInt:bitrate / 1000],
|
NSDictionary *properties = @{@"bitrate": [NSNumber numberWithInt:bitrate / 1000],
|
||||||
@"sampleRate": [NSNumber numberWithInt:sampleRate],
|
@"sampleRate": [NSNumber numberWithInt:sampleRate],
|
||||||
@"totalFrames": [NSNumber numberWithDouble:totalFrames],
|
@"totalFrames": [NSNumber numberWithDouble:totalFrames],
|
||||||
@"bitsPerSample": [NSNumber numberWithInt:16],
|
@"bitsPerSample": [NSNumber numberWithInt:16],
|
||||||
@"floatingPoint": [NSNumber numberWithBool:NO],
|
@"floatingPoint": [NSNumber numberWithBool:NO],
|
||||||
@"channels": [NSNumber numberWithInt:channels],
|
@"channels": [NSNumber numberWithInt:channels],
|
||||||
@"channelConfig": [NSNumber numberWithUnsignedInt:channelConfig],
|
@"seekable": [NSNumber numberWithBool:YES],
|
||||||
@"seekable": [NSNumber numberWithBool:YES],
|
@"replayGainAlbumGain": rgAlbumGain,
|
||||||
@"replayGainAlbumGain": rgAlbumGain,
|
@"replayGainAlbumPeak": rgAlbumPeak,
|
||||||
@"replayGainAlbumPeak": rgAlbumPeak,
|
@"replayGainTrackGain": rgTrackGain,
|
||||||
@"replayGainTrackGain": rgTrackGain,
|
@"replayGainTrackPeak": rgTrackPeak,
|
||||||
@"replayGainTrackPeak": rgTrackPeak,
|
@"codec": codec,
|
||||||
@"codec": codec,
|
@"endian": @"host",
|
||||||
@"endian": @"host",
|
@"encoding": @"lossy/lossless"};
|
||||||
@"encoding": @"lossy/lossless" };
|
|
||||||
|
|
||||||
if([title isEqualToString:@""]) {
|
if([title isEqualToString:@""]) {
|
||||||
if(stream->num_streams > 1) {
|
if(stream->num_streams > 1) {
|
||||||
|
@ -246,7 +247,9 @@ static NSString *get_description_tag(const char *description, const char *tag, c
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
int output_channels = stream->channels;
|
int output_channels = stream->channels;
|
||||||
channelConfig = stream->channel_layout;
|
|
||||||
|
vgmstream_mixing_autodownmix(stream, 6);
|
||||||
|
vgmstream_mixing_enable(stream, MAX_BUFFER_SAMPLES, NULL, &output_channels);
|
||||||
|
|
||||||
canPlayForever = stream->loop_flag;
|
canPlayForever = stream->loop_flag;
|
||||||
if(canPlayForever) {
|
if(canPlayForever) {
|
||||||
|
|
Loading…
Reference in New Issue