Re: Streaming Audio - AudioFileStream, CFReadStreamRead and AudioQueue
Re: Streaming Audio - AudioFileStream, CFReadStreamRead and AudioQueue
- Subject: Re: Streaming Audio - AudioFileStream, CFReadStreamRead and AudioQueue
- From: Alexander Saal <email@hidden>
- Date: Mon, 23 Nov 2009 10:47:51 +0100
Hi Bill,
I've looked for a solution on the weekend and I have found AUGraphAddRenderNotify. This requires a callback function like this:
OSStatus AURenderCallack( void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData );
I have defined this function and I have connect to them: AUGraphAddRenderNotify(outputGraph, AURenderCallack, mAQOfflineRender);^
The third parameter is a struct from me and has the following members: typedef struct { AudioFileStreamID mAudioFileStream; CFReadStreamRef mAudioStream; AudioStreamBasicDescription mAudioDataOutputFormat; AudioStreamBasicDescription mAudioDataInputFormat; AudioQueueRef mAudioQueue; AudioQueueBufferRef mAudioBuffer[kNumAQBufs]; AudioStreamPacketDescription mAudioPacketDescs[kAQMaxPacketDescs]; SInt64 mAudioCurrentPacket; UInt32 mAudioNumPacketsToRead; } AQRender;
Now my problem is: How can I send the AudioQueueBufferRef to the AudioBufferList? Or in general: How do I connect the buffered stream to my graph? I don't understand how to "feed" the AU's callback with the AudioQueueOfflineRenderer. Can you give me an example?
Best regards Alexander Saal |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden