MacErudite Mac Forums Forum Index
  

Playing Audio Selection

 
Post new topic    MacErudite Mac Forums Forum Index -> General Programming
View previous topic :: View next topic  
Sponsored Links
Luca_a
Guest





 PostPosted: Fri Jul 06, 2007 6:39 am    Post subject: Playing Audio Selection Back to top

Hi everyone,

I am an experienced programmer but quite new in Mac OS programming. I am going to write a program that play a selection of an audio file (eg: MP3, avi, ...) for example I should be able to say play only 1 minute of the file from time 1:20 min to 2:20 min .
I can see that there are wide range of Audio libraries available for Mac OS (some for Cocoa, some for Cobra, some for both, some of them very high level, some very low level).
Can anyone please point me to the right direction of what is the best library to use for above purpose.

Thanks in advance,

Luca
 
Patrick Machielse
Guest





 PostPosted: Fri Jul 06, 2007 8:46 am    Post subject: Re: Playing Audio Selection Back to top

Luca_a <nojunk@nojunk.com> wrote:


Quote:
I am an experienced programmer but quite new in Mac OS programming. I am going to write a program that play a selection of an audio file (eg: MP3, avi, ...) for example I should be able to say play only 1 minute of the file from time 1:20 min to 2:20 min.

Your best bet is the QTMovie class from QTKit. It provides more features than NSSound and is future proof.

If you want a lower level solution, you can use Audio Units; create a simple graph consisting of a file player AU and a default output AU. You will want to use this solution if you plan to add mixers, equalizers and what have you.

patrick
 
Luca_a
Guest





 PostPosted: Sat Jul 07, 2007 3:30 am    Post subject: Re: Playing Audio Selection Back to top

Do you know any sample code on using QTMovie.
"Patrick Machielse" <noreply@mail.invalid> wrote in message news:1i0u3i4.149nljqkmmibsN%noreply@mail.invalid...
Quote:
Luca_a <nojunk@nojunk.com> wrote:


Quote:
I am an experienced programmer but quite new in Mac OS programming. I am going to write a program that play a selection of an audio file (eg: MP3, avi, ...) for example I should be able to say play only 1 minute of the file from time 1:20 min to 2:20 min.

Your best bet is the QTMovie class from QTKit. It provides more features than NSSound and is future proof.

If you want a lower level solution, you can use Audio Units; create a simple graph consisting of a file player AU and a default output AU. You will want to use this solution if you plan to add mixers, equalizers and what have you.

patrick
 
Patrick Machielse
Guest





 PostPosted: Sat Jul 07, 2007 6:20 am    Post subject: Re: Playing Audio Selection Back to top

Luca_a <nojunk@nojunk.com> wrote:


Quote:
Do you know any sample code on using QTMovie.

I don't have any pointers at hand, but it isn't difficult. This might help:

<http://developer.apple.com/samplecode/QTKitPlayer/index.html>
I recommend the articles by Tim Monroe in Mactech Magazine:
<http://www.mactech.com/articles/mt_indices/M_Authors.html>
esp. the ones on the 'Quicktime for Cocoa Kit'.
Tim is a senior engineer on Apple's Quicktime team, an he writes very clearly. He can even make the Quicktime C-API seem easy and logical, a mayor feat!

patrick
 
Luca_a
Guest





 PostPosted: Sun Jul 08, 2007 4:38 am    Post subject: Re: Playing Audio Selection Back to top

Hi Patrick,

Thank you so much for your help. Article
http://www.mactech.com/articles/mactech/Vol.21/21.05/QuickTimeForCocoaKit/index.html was exactly what I was looking for.
That is going to definitely save me lots of time searching through all sorts of documentations.

Luca

"Patrick Machielse" <noreply@mail.invalid> wrote in message news:1i0vqjd.1l7k3hr1q97qv2N%noreply@mail.invalid...
Quote:
Luca_a <nojunk@nojunk.com> wrote:


Quote:
Do you know any sample code on using QTMovie.

I don't have any pointers at hand, but it isn't difficult. This might help:

<http://developer.apple.com/samplecode/QTKitPlayer/index.html>
I recommend the articles by Tim Monroe in Mactech Magazine:
<http://www.mactech.com/articles/mt_indices/M_Authors.html>
esp. the ones on the 'Quicktime for Cocoa Kit'.
Tim is a senior engineer on Apple's Quicktime team, an he writes very clearly. He can even make the Quicktime C-API seem easy and logical, a mayor feat!

patrick
 
Display posts from previous:   
Post new topic    MacErudite Mac Forums Forum Index -> General Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum