ios - ObjectAl latency settings -
using objectal ios soundboard app. working far. if can tweak latency little more awesome. right using straight oalsimpleaudio. know if there parameters should adjust in oalsimpleaudio.m file try latency lower? thanks! new programming having fun!
#import "btm_soundview.h" #import <audiotoolbox/audiotoolbox.h> #import <avfoundation/avfoundation.h> #import "pandrum_appdelegate.h" #import "objectal.h" @implementation btm_soundview - (id) init { if(nil != (self = [super init])) { // don't want ipod music keep playing since // have our own bg music. [oalsimpleaudio sharedinstance].allowipod = no; // mute audio if silent switch turned on. [oalsimpleaudio sharedinstance].honorsilentswitch = yes; // loads sound effects memory // there's no delay when tell play them. [[oalsimpleaudio sharedinstance] preloadeffect:@"ding.caf"]; [[oalsimpleaudio sharedinstance] preloadeffect:@"templebell.caf"]; [[oalsimpleaudio sharedinstance] preloadeffect:@"snare.wav"]; [[oalsimpleaudio sharedinstance] preloadeffect:@"snare.caf"]; } return self; } @synthesize viewcontroller = _viewcontroller; - (void)didreceivememorywarning { [super didreceivememorywarning]; // release cached data, images, etc aren't in use. } #pragma mark - view lifecycle - (void)viewdidload { [super viewdidload]; } /* // made .caf file in terminal each sound afconvert -f caff -d lei16 templebell.wav templebell.caf */ - (ibaction)ssound1{ [[oalsimpleaudio sharedinstance] playeffect:@"snare.wav"]; } - (ibaction)ssound2{ [[oalsimpleaudio sharedinstance] playeffect:@"templebell.caf"]; } - (ibaction)ssound3{ [[oalsimpleaudio sharedinstance] playeffect:@"ding.caf"]; } - (ibaction)ssound4{ [[oalsimpleaudio sharedinstance] playeffect:@"snare.caf"]; } @end
Comments
Post a Comment