 |
|
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
Luca_a Guest
 |
Posted: Fri Jul 06, 2007 6:39 am Post subject: Playing Audio Selection |
 |
|
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
 |
Posted: Fri Jul 06, 2007 8:46 am Post subject: Re: Playing Audio Selection |
 |
|
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
 |
Posted: Sat Jul 07, 2007 3:30 am Post subject: Re: Playing Audio Selection |
 |
|
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
 |
Posted: Sat Jul 07, 2007 6:20 am Post subject: Re: Playing Audio Selection |
 |
|
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
 |
Posted: Sun Jul 08, 2007 4:38 am Post subject: Re: Playing Audio Selection |
 |
|
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 |
|
|
| |
|
|
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
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
|
|
|