Re: Play a song with QTMovie
Re: Play a song with QTMovie
- Subject: Re: Play a song with QTMovie
- From: Dani <email@hidden>
- Date: Wed, 27 Jun 2007 00:36:24 +0200
Wow!! Thanks for this info. I don't know this about NSSound. I'll try
it.
El 27/06/2007, a las 0:32, Michael Watson escribió:
NSSound overview:
"The NSSound class provides a simple interface for loading and
playing AIFF, WAV, and NeXT “.snd” files. NSSound supports 16-bit,
mono and stereo, 44.1KHz and 22.05KHz data."
But there's some errata to this. If you're using 10.3, NSSound
first tries CoreAudio for audio playback. If this is successful,
you get additional formats.
http://developer.apple.com/qa/qa2001/qa1335.html
--
m-s
On 26 Jun, 2007, at 18:25, John Stiles wrote:
On Jun 26, 2007, at 2:31 PM, Dani wrote:
It would be easier with NSSound but I can't play .mp3, .m4a
songs. Am I wrong?
I thought NSSound wrapped QuickTime so I'd think it could handle
those.
Now I've added a NSTableView and a Open button to select one or
more songs. At this time is working, but now I want to show in
the NSTableView the songs that are stored in a NSMutableArray.
The songs are stored in the NSMutableArray when I push the Open
button, select one or more songs, and push the OK button.
I've been reading a lot of NSTableView and setDataSource method
but I don't know how to do what I want. Some help?
Thanks.
El 26/06/2007, a las 23:19, R. Matthew Emerson escribió:
On Jun 26, 2007, at 8:46 AM, Dani wrote:
I've tried making a new Cocoa Application project with Xcode,
and now it seems to work well, but now I don't know how to
check if a song is currently playing or not.
- (IBAction)play:(id)sender
{
src = @"/Users/bittercold/Desktop/deadbolt.aif";
snd = [[QTMovie alloc] initWithFile:src error: NULL];
[snd play];
}
You can also use NSSound here in lieu of QTMovie. NSSound
includes the delegate method sound:didFinishPlaying:.
You might like to look at http://www.thoughtstuff.com/rme/
weblog/?p=10 (which is a little post about playing sounds from
the command line).
_______________________________________________
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
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:
40bungie.org
This email sent to email@hidden
_______________________________________________
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