[英]How to record audio from playing music player
在我的應用程序中,我正在使用AvAudioplayer播放音頻,播放音頻后,我必須記錄來自AvAudioplayer和任何其他外部聲音的音頻以及音頻。
我怎樣才能做到這一點。
謝謝
使用此功能播放聲音
- (AVAudioPlayer *)getNoteFromFilename:(NSString *)name andoftype:(NSString *)type{
NSString *soundPath = [[NSBundle mainBundle] pathForResource:name
ofType:type];
NSURL *fileURL = [NSURL fileURLWithPath:soundPath];
AVAudioPlayer *note = [[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL
error:nil] autorelease];
return note;
你可以這樣調用函數
self.btn_do = [self getNoteFromFilename:@"MusicFileName" andoftype:@"mp3"];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.