• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iPhoneOS AudioQueueOfflineRender
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhoneOS AudioQueueOfflineRender


  • Subject: iPhoneOS AudioQueueOfflineRender
  • From: Marc Aurel Kiefer <email@hidden>
  • Date: Thu, 11 Sep 2008 11:29:23 +0200

Hi,

I need to decode MP3 files on an iPhone but Audio Codec Services aren't available. So I think AudioQueueOfflineRender is the way to go. As I understand this I just need to change my working playback example code to not call AudioQueuePlay, but AudioQueueSetOfflineRenderFormat and then repeatedly call AudioQueueOfflineRender to get the decoded buffers. But the only thing i get back is a zero filled buffer. There was already a "solution" on this list, where somebody said he had to call AudioQueueOfflineRender in the "render callback" but I dont know what that means. Here are some code snippets I think might be interesting in case I'm doing something completely wrong (some checks removed to improve readability):



AudioStreamBasicDescription streamDesc;
FillOutASBDForLPCM(streamDesc, 44100, 2, 16, 16, false, false,false);
struct AudioChannelLayout layout=
{
	kAudioChannelLayoutTag_Stereo,
	0,
	0,
	NULL
};
AudioQueueSetOfflineRenderFormat(queue, &streamDesc, &layout);

...
//get the first buffer (values hardcoded for testing)
struct AudioTimeStamp timeStamp =
	{
		0,
		0,
		0,
		0,
		0,
		kAudioTimeStampSampleTimeValid,
		0
	};
AudioQueueBufferRef outBuffer;
AudioQueueAllocateBuffer(queue, gBufferSizeBytes, &outBuffer);
AudioQueueOfflineRender(queue, &timeStamp, outBuffer, 16384))


_______________________________________________ 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
  • Prev by Date: Re: AU Cocoa UI in Carbon window?
  • Next by Date: Stabilizing AudioQueue
  • Previous by thread: Re: Cocoa Views
  • Next by thread: Stabilizing AudioQueue
  • Index(es):
    • Date
    • Thread