¡@

Home 

2014/10/15 ¤U¤È 10:14:19

iphone Programming Glossary: soundslist

Play multiple audio files using AVAudioPlayer

http://stackoverflow.com/questions/2586284/play-multiple-audio-files-using-avaudioplayer

first item. Now you add one item at a time track01 track02 etc... one per line. This code goes in your .h file NSArray soundsList This code goes in your .m file NSString soundsPath NSBundle mainBundle pathForResource @ soundslist ofType @ plist soundsList.. This code goes in your .m file NSString soundsPath NSBundle mainBundle pathForResource @ soundslist ofType @ plist soundsList NSArray alloc initWithContentsOfFile soundsPath Arrays always start at index # 0... so if you have 5 tracks track01 would.. 1 and so on. If you want to quickly poll your array to see what's in it you can add this bit of code int i 0 for i i soundsList count 1 i NSLog @ soundsList contains @ soundsList objectAtIndex i All that does is count how many items are in your array..