Unable to play a .mp3 file directly using QTMovie
Unable to play a .mp3 file directly using QTMovie
- Subject: Unable to play a .mp3 file directly using QTMovie
- From: Devarshi Kulshreshtha <email@hidden>
- Date: Tue, 5 Oct 2010 17:53:16 +0530
Hi all,
I am trying to play a .mp3 file on click of a button using this code:
NSString <http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSString.html>
*audioFilePath=[[audioInputTextField stringValue]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];NSURL
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSURL.html>
*audioUrl = [[NSURL
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSURL.html>
alloc] initWithString:audioFilePath];
QTMovie* soundToPlay = [[QTMovie alloc] initWithURL:audioUrl
error:nil];[soundToPlay play];
Here user is expected to enter a valid url for an audio file in text
field and then click button next to it to play, but it is not working
for me ie. no audio gets played :(
Can anyone suggest me, if I am doing anything wrong?
The sample code can be downloaded from here- http://db.tt/cDjFCZO
One of the example links which I tried was -
http://javamax.free.fr/sonorisation et radio/Linken Park - In The End.mp3
--
Thanks,
Devarshi
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden