Remove unnecessary cleanup code that impeded cases where multiple decoders could handle a single file type.

CQTexperiment
Christopher Snowhill 2019-07-07 00:37:56 -07:00
parent d9d145007e
commit c1a45135b3
15 changed files with 0 additions and 43 deletions

View File

@ -32,7 +32,6 @@
return NO;
NSURL *url = [s url];
[s close];
apl = [APLFile createWithFile:[url path]];

View File

@ -138,11 +138,6 @@
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}
- (void)dealloc

View File

@ -184,7 +184,6 @@ static BOOL g_parse_unpack_path(NSString * src, NSString ** archive, NSString **
- (void)dealloc {
[self close];
[self setURL:nil];
}
@end

View File

@ -50,7 +50,6 @@
OSStatus err;
NSURL *url = [source url];
[source close]; //There's no room for your kind around here!
err = ExtAudioFileOpenURL((__bridge CFURLRef)url, &_in);
if(noErr != err) {

View File

@ -48,7 +48,6 @@
}
NSURL *url = [s url];
[s close];
cuesheet = [CueSheet cueSheetWithFile:[url path]];

View File

@ -157,7 +157,6 @@
- (void)dealloc {
[self close];
[self setURL:nil];
}
@end

View File

@ -253,8 +253,6 @@ void ErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorS
{
free(blockBuffer);
}
[source close];
[self setSource:nil];
decoder = NULL;
blockBuffer = NULL;

View File

@ -200,10 +200,6 @@ gme_err_t readCallback( void* data, void* out, long count )
gme_delete(emu);
emu = NULL;
}
if (source) {
[source close];
[self setSource:nil];
}
}
- (void)dealloc

View File

@ -341,8 +341,6 @@ static OSType getOSType(const char * in_)
{
delete player;
player = NULL;
[source close];
source = nil;
}
- (void)dealloc

View File

@ -174,8 +174,6 @@ mpc_bool_t CanSeekProc(mpc_reader *p_reader)
mpc_demux_exit(demux);
demux = NULL;
}
[source close];
source = nil;
}
- (void)dealloc

View File

@ -153,11 +153,6 @@ static void g_push_archive_extensions(std::vector<std::string> & list)
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}
- (void)dealloc

View File

@ -29,9 +29,6 @@ int sourceSeek(void *_stream, opus_int64 _offset, int _whence)
int sourceClose(void *_stream)
{
id source = (__bridge id)_stream;
[source close];
return 0;
}
@ -123,9 +120,6 @@ opus_int64 sourceTell(void *_stream)
{
op_free(opusRef);
opusRef = NULL;
[source close];
source = nil;
}
- (void)dealloc

View File

@ -13,7 +13,6 @@
- (BOOL)open:(id<CogSource>)source
{
NSURL *url = [source url];
[source close];
if (![[url scheme] isEqualToString:@"file"])
return NO;

View File

@ -27,9 +27,6 @@ int sourceSeek(void *datasource, ogg_int64_t offset, int whence)
int sourceClose(void *datasource)
{
id source = (__bridge id)datasource;
[source close];
return 0;
}
@ -117,9 +114,6 @@ long sourceTell(void *datasource)
- (void)close
{
ov_clear(&vorbisRef);
[source close];
source = nil;
}
- (void)dealloc

View File

@ -215,11 +215,6 @@
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}
- (void)dealloc