Posted By

oppey on 05/23/11


Tagged

AVAudioPlayer


Versions (?)

[iPhone 開発メモ] AVAudioPlayer を使用して音楽を再生する


 / Published in: Objective C
 

  1. #include <AVFoundation/AVFoundation.h>
  2. //---------------------
  3.  
  4. NSString *path = [[NSBundle mainBundle] pathForResource:@"loop_9" ofType:@"mp3"];
  5. NSURL *url = [NSURL fileURLWithPath:path];
  6. AVAudioPlayer *audio = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
  7. [audio play];
  8.  

Report this snippet  

You need to login to post a comment.