1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00

39 lines
548 B
Mathematica
Raw Normal View History

//
// Song.m
// XNI
//
// Created by Matej Jan on 18.1.11.
// Copyright 2011 Retronator. All rights reserved.
//
#import "Song.h"
#import "Song+Internal.h"
@implementation Song
- (id) initWithUrl:(NSURL*)url
{
self = [super init];
if (self != nil) {
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
}
return self;
}
- (NSTimeInterval) duration {
return audioPlayer.duration;
}
- (AVAudioPlayer *) audioPlayer {
return audioPlayer;
}
- (void) dealloc
{
[audioPlayer release];
[super dealloc];
}
@end