syedhali / EZAudio

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
Other
4.96k stars 822 forks source link

Help with implementing EZAudioPlayerDelegate in Swift #294

Closed parsley75 closed 8 years ago

parsley75 commented 8 years ago

Hi, I'm struggling converting this code in your EZAudioPLayer example

// Declare the EZAudioFile as a strong property
@property (nonatomic, strong) EZAudioFile *audioFile;

...

// Create an EZAudioPlayer with a delegate that conforms to EZAudioPlayerDelegate
self.player = [EZAudioPlayer audioPlayerWithDelegate:self];

to swift. Can anyone help please? Especially if i need more code to ensure it works I realise this may be basic for most of you, So thanks in advance

Kind Regards

Mark

freak4pc commented 8 years ago

It should just be

var player: EZAudioFile!

self.player = EZAudioPlayer(delegate: self)
parsley75 commented 8 years ago

thanks @freak4pc , i really could come round and hug you. i'd solved many of the delegate problems and that was the final piece of the puzzle. i suppose its the trouble with learning ios apps and swift and audio at the same time. thanks again

freak4pc commented 8 years ago

Sure thing. Good luck!