recording streaming audio on iphone/ipod touch
This application currently plays audio from onine stations.
Basically it has 2 main features: Play: On click of a station name or the play button, the fm station starts playing.
Record : On click of the record link, the recorders starts recording. Clicking it again, stops and replays the recorded audio.
The problem
- The streaming recording is not recording clearly. The current recorder using AVAudioRecorder though records the audio, the sound is noisy. Could it be because the streaming audio uses audioQueue while the recorder used is AVAudioRecorder which also records from microphone.We want to record only the streaming content.开发者_C百科
Note: The AVAudioRecorder when used for voice recording is clear, but not good with recording streaming audio content.
For playing streaming audio, i used code from Mr. Matt Gallagher link is here
Can you please suggest a better way to record streaming audio. Is there an existing API like AVAudioRecorder or am I doing something wrong ?
Please Look at this Framework. It provide data for recording while recording Streaming Kit Streaming Kit
Play an MP3 over HTTP
STKAudioPlayer* audioPlayer = [[STKAudioPlayer alloc] init];
[audioPlayer play:@"http://www.abstractpath.com/files/audiosamples/sample.mp3"];
And append its data to NSMutabledata to play offline by using this delegate.
Intercept PCM data just before its played
[audioPlayer appendFrameFilterWithName:@"MyCustomFilter" block:^(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UInt32 frameCount, void* frames)
{
...
}];
精彩评论