• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Playing a audio file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Playing a audio file


  • Subject: Re: Playing a audio file
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 12 Jul 2008 22:30:16 -0700


On 12 Jul '08, at 10:03 PM, email@hidden wrote:

I am new to *Ph*n* app developer.

You can't talk about that here, it's under NDA. So pretend you're doing Mac development, since the APIs are nearly the same.


I want to play a op46.caf[audio file] which reside in Resources folder.I
tried lot but all in vain.


my code snippet :
...
NSString *moviePath = [bundle pathForResource:@"op467" ofType:@"vaf" ];

The typo in the filename might be one reason you're not getting any audio.


status = AudioFileOpenURL(MPfile, 0x01, kAudioFileCAFType, &audioFile);

That will open the file for reading ... but it's not going to play it for you. Just like calling fopen( ) on a text file isn't going to display it onscreen.


Any sample codes Please.......

Read the documentation for System Audio Services; that's the simplest way to play short sounds with a single call.
If you need more control, or need to play long audio tracks, look at the sample code in /Developer/Examples/CoreAudio/SimpleSDK.


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Playing a audio file (From: email@hidden)

  • Prev by Date: Re: iPhone SDK discussions?
  • Next by Date: Re: iPhone SDK discussions?
  • Previous by thread: Playing a audio file
  • Next by thread: AUFilePlayer
  • Index(es):
    • Date
    • Thread