there seem to be almost no posts on playing one NSSound multiple times aynchrosnously
well this is how
below sound is NSSound object
NSSound *sound;
- (void)playSound {
[[[sound copy] autorelease] play];
}
by copying the object you can play one sound many times overlapping
use method below to do something when the sound stops ad set sound as delegate
- (void)sound:(NSSound *)asound didFinishPlaying:(BOOL)aBool {
[asound stop]
}
반응형
'iPhone' 카테고리의 다른 글
NSData dataWithContentsOfURL returns nil (0) | 2015.01.30 |
---|---|
iOS CLLocationManager 바뀐점 8.0 (0) | 2014.10.22 |
ios version check (0) | 2014.01.03 |
ios7 setting status bar style (0) | 2014.01.03 |
아이폰 가격에 대하여 (0) | 2013.10.27 |