Added title reading for multi-song VGMStream files.
parent
1ef9455f9d
commit
29e548d583
|
@ -17,6 +17,8 @@
|
|||
@interface VGMDecoder : NSObject <CogDecoder> {
|
||||
VGMSTREAM *stream;
|
||||
|
||||
NSString *title;
|
||||
|
||||
int sampleRate;
|
||||
int channels;
|
||||
int bitrate;
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
|
||||
bitrate = get_vgmstream_average_bitrate(stream);
|
||||
|
||||
if (stream->num_streams > 1) {
|
||||
title = [NSString stringWithFormat:@"%@ - %@", [[[s url] URLByDeletingPathExtension] lastPathComponent], stream->stream_name];
|
||||
} else {
|
||||
title = [[[s url] URLByDeletingPathExtension] lastPathComponent];
|
||||
}
|
||||
|
||||
[self willChangeValueForKey:@"properties"];
|
||||
[self didChangeValueForKey:@"properties"];
|
||||
|
||||
|
@ -47,6 +53,7 @@
|
|||
[NSNumber numberWithBool:NO], @"floatingPoint",
|
||||
[NSNumber numberWithInt:channels], @"channels",
|
||||
[NSNumber numberWithBool:YES], @"seekable",
|
||||
title, @"title",
|
||||
@"host", @"endian",
|
||||
nil];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue