I would like to use an iPhone as the audio source for an ICEcast stream.
1) is the AudioQueueInputCallback where I should be sending this stream?
2) I have been able to identify the protocol for ICEcast Icecast 2: protocol description, streaming to it using C# However, I am not certain how to do this in the callback code (i.e. how to send the binary audio)
UPDATE
static void MyAQInputCallback( void *inUserData,
AudioQueueRef inQueue,
AudioQueueBufferRef inBuffer,
const AudioTimeStamp *inStartTime,
UInt32 inNumPackets,
cont AudioStreamPacketDescription *inPacketDesc)
{
if (inNumPackets > 0)
{
// instead of
// AudioFileWritePackets(someFile, FALSE,
// inBuffer->mAudioDataByteSize,
// inPacketDesc, recordPacketNumber,
// &inNumPackets, inBuffer->mAudioData);
// I want to send to http://myicecastserver
// instead
}
}
UPDATE
I will open a socket connection to my icecast server to send the data.