I would like to be able to loop some sections of the sample using c4. I would also like to skip between loops without waiting for the end of the current loop. So, for example, if I have the last cycle of the cycle, and I'm halfway, and I want to go to the first bar, he will do this without waiting for the end of the last bar.
I used "currentTime" and "touchhesBegan" to try to configure it, but I can't get it to work the way I want it to. I read about the stack overflow about this, and it looks like I should have NSTimer? or some kind of callback or something else? How can i do this?
Here is what I have:
@implementation C4WorkSpace {
C4Sample *audioSample;
}
-(void)setup {
audioSample = [C4Sample sampleNamed:@"C4Loop.aif"];
[audioSample play];
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
audioSample.currentTime = 1.0f;
}
@end
source
share