iPhone 播放 midi 文件的方法
2010-08-29 01:41:00 来源:WEB开发网result = sound1->setMode(FMOD_LOOP_OFF);
// ERRCHECK(result);
// midi two
[[NSString stringWithFormat:@"%@/Drum_sample.mid", [[NSBundle mainBundle] resourcePath]] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];
result = system->createSound(buffer, FMOD_SOFTWARE | FMOD_CREATESTREAM, &soundExInfo, &sound2);
result = sound2->setMode(FMOD_LOOP_OFF);
// timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(timerUpdate:) userInfo:nil repeats:YES];
}
- (IBAction)playSound1:(id)sender
{
FMOD_RESULT result = FMOD_OK;
result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel);
ERRCHECK(result);
}
- (IBAction)playSound2:(id)sender
{
FMOD_RESULT result = FMOD_OK;
result = system->playSound(FMOD_CHANNEL_FREE, sound2, false, &channel);
ERRCHECK(result);
}
- (void)timerUpdate:(NSTimer *)timer
{
}
@end
- ››iPhone应用帮助残障儿童看图说话
- ››iPhone实用工具AppBox Pro使用教程大揭秘
- ››iphone4省电方法
- ››iphone 获取地址的详细信息
- ››iPhone 库的基本内存管理策略
- ››iPhone加密文字亲手做 私密信息有保障
- ››iphone 根据经纬度坐标取详细地址(包括国,省,市...
- ››iphone/ipad ios cocoa object-c 近期苹果UI部分小...
- ››iphone中如何进行多线程编程
- ››iPhone OS SDK的这些事[安装、下载、版本、实例、...
- ››iPhone ObjectC的NSAutoreleasePool
- ››iPhone 判断设备是在Portrait(纵向)还是(Landscap...
更多精彩
赞助商链接