2007-10-09 02:25:40 +00:00
|
|
|
//
|
|
|
|
// CueSheetTrack.m
|
|
|
|
// CueSheet
|
|
|
|
//
|
|
|
|
// Created by Zaphod Beeblebrox on 10/8/07.
|
|
|
|
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "CueSheetTrack.h"
|
|
|
|
|
|
|
|
@implementation CueSheetTrack
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (id)trackWithURL:(NSURL *)u track:(NSString *)t time:(double)s timeInSamples:(BOOL)tis artist:(NSString *)a album:(NSString *)b title:(NSString *)l genre:(NSString *)g year:(NSString *)y albumGain:(float)albumGain albumPeak:(float)albumPeak trackGain:(float)trackGain trackPeak:(float)trackPeak {
|
|
|
|
return [[CueSheetTrack alloc] initWithURL:u track:t time:s timeInSamples:tis artist:a album:b title:l genre:g year:y albumGain:albumGain albumPeak:albumPeak trackGain:trackGain trackPeak:trackPeak];
|
2007-10-10 01:59:25 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (id)initWithURL:(NSURL *)u track:(NSString *)t time:(double)s timeInSamples:(BOOL)tis artist:(NSString *)a album:(NSString *)b title:(NSString *)l genre:(NSString *)g year:(NSString *)y albumGain:(float)albumGain albumPeak:(float)albumPeak trackGain:(float)trackGain trackPeak:(float)trackPeak {
|
2007-10-09 02:25:40 +00:00
|
|
|
self = [super init];
|
2022-02-07 05:49:27 +00:00
|
|
|
if(self) {
|
2007-10-09 02:25:40 +00:00
|
|
|
track = [t copy];
|
2007-10-10 01:59:25 +00:00
|
|
|
url = [u copy];
|
2007-10-13 01:07:19 +00:00
|
|
|
artist = [a copy];
|
|
|
|
album = [b copy];
|
|
|
|
title = [l copy];
|
|
|
|
genre = [g copy];
|
|
|
|
year = [y copy];
|
2022-02-07 05:49:27 +00:00
|
|
|
|
2007-10-10 01:59:25 +00:00
|
|
|
time = s;
|
2022-02-07 05:49:27 +00:00
|
|
|
timeInSamples = tis;
|
|
|
|
|
|
|
|
self->albumGain = albumGain;
|
|
|
|
self->albumPeak = albumPeak;
|
|
|
|
self->trackGain = trackGain;
|
|
|
|
self->trackPeak = trackPeak;
|
2007-10-09 02:25:40 +00:00
|
|
|
}
|
2022-02-07 05:49:27 +00:00
|
|
|
|
2007-10-09 02:25:40 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)track {
|
2007-10-09 02:25:40 +00:00
|
|
|
return track;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSURL *)url {
|
2007-10-10 01:59:25 +00:00
|
|
|
return url;
|
2007-10-09 02:25:40 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (double)time {
|
2007-10-10 01:59:25 +00:00
|
|
|
return time;
|
2007-10-09 02:25:40 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (BOOL)timeInSamples {
|
|
|
|
return timeInSamples;
|
2022-01-15 06:45:45 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)artist {
|
2007-10-13 01:07:19 +00:00
|
|
|
return artist;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)album {
|
2007-10-13 01:07:19 +00:00
|
|
|
return album;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)title {
|
2007-10-13 01:07:19 +00:00
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)genre {
|
2007-10-13 01:07:19 +00:00
|
|
|
return genre;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)year {
|
2007-10-13 01:07:19 +00:00
|
|
|
return year;
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (float)albumGain {
|
|
|
|
return albumGain;
|
2022-01-15 02:51:44 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (float)albumPeak {
|
|
|
|
return albumPeak;
|
2022-01-15 02:51:44 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (float)trackGain {
|
|
|
|
return trackGain;
|
2022-01-15 02:51:44 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (float)trackPeak {
|
|
|
|
return trackPeak;
|
2022-01-15 02:51:44 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
- (NSString *)description {
|
|
|
|
return [NSString stringWithFormat:@"CueSheetTrack{track: %@, url: %@, artist: %@, album: %@, title: %@, genre: %@, year: %@}", track, [url absoluteURL], artist, album, title, genre, year];
|
2013-10-11 13:20:08 +00:00
|
|
|
}
|
2007-10-13 01:07:19 +00:00
|
|
|
|
2007-10-09 02:25:40 +00:00
|
|
|
@end
|