1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
Matej Jan 74ccf177c5 Adding missing folders
git-svn-id: http://xni.googlecode.com/svn/XNI@55 ac433895-eea3-a490-d80a-17149a75e588
2011-02-01 15:47:13 +00:00

40 lines
579 B
Objective-C

//
// 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];
[audioPlayer prepareToPlay];
}
return self;
}
- (NSTimeInterval) duration {
return audioPlayer.duration;
}
- (AVAudioPlayer *) audioPlayer {
return audioPlayer;
}
- (void) dealloc
{
[audioPlayer release];
[super dealloc];
}
@end