문제

NSString *soundFileURL=[[NSBundle mainBundle]pathForResource:@"noise" ofType:@"wma"];

self.noise=[[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:soundFileURL] error:nil];

[self.noise play];

then the main.m have mistake. When I use short media about 1 sec it would work.

도움이 되었습니까?

해결책

Because AVFoundation can't play Windows Media audio (WMA). Convert your "noise" to a supported format, such as MP3 or AAC.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top