quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #43 AVAudioPlayer

AVAudioPlayer - NSScreencast

自作のAudioプレーヤー

  • AVFoundation framework
    • #import <AVFoundation/AVFoundation.h>
  • AVAudioPlayer
    • [[AVAudioPlayer alloc] initWithContentsOfURL:[self localAudioFileURL]
      • initWithData:error
    • self.audioPlayer.volume
      • = self.volumeSlider.value;
    • if (![self.audioPlayer isPlaying])
    • toggle pause button
    • [self.audioPlayer play];
    • [self.audioPlayer pause];
  • UIProgressView
    • [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(onTimerTick:) userInfo:nil repeats:YES];
    • NSTimeInterval totalTime = [self.audioPlayer duration];
    • NSTimeInterval currentTime = [self.audioPlayer currentTime];
    • CGFloat progress = currentTime / totalTime;
    • self.songProgressView.progress = progress;
  • AudioLevelsView
    • 音の波を表示
    • Audio Level
    • channel
    • audioPlayer.meteringEnabled = YES;
    • [self.audioPlayer updateMeters];

動画中で使われている楽曲

Alice In Chains - Angry Chair