<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Playing synthesized audio in background. &#8211; Politepix</title>
		<atom:link href="/forums/topic/playing-synthesized-audio-in-background/feed/" rel="self" type="application/rss+xml" />
		<link>/forums/topic/playing-synthesized-audio-in-background/feed/</link>
		<description></description>
		<lastBuildDate>Tue, 23 Apr 2024 14:48:27 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.9</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>/forums/topic/playing-synthesized-audio-in-background/#post-14830</guid>
					<title><![CDATA[Playing synthesized audio in background.]]></title>
					<link>/forums/topic/playing-synthesized-audio-in-background/#post-14830</link>
					<pubDate>Sat, 08 Dec 2012 02:24:40 +0000</pubDate>
					<dc:creator>MB</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>Is there someway to play synthesized audio when the app moves to background by pressing the home button?<br />
I am able to consistently reproduce this issue in a &#8220;Hello World&#8221; application that I have written for testing FliteController and openearsextras. I am happy to share this with in case anyone wants to try.</p>
<p>I&#8217;ve tried all of the following:</p>
<p>1.) Changed plist to indicate that app plays audio in background.<br />
2.) Added the following line. I don&#8217;t think this should make any difference.<br />
		[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];<br />
3.) I&#8217;ve also tried changing the category of audio sesson to Playback in my app.</p>
<p>	AVAudioSession* sessionInst = [AVAudioSession sharedInstance];<br />
		BOOL succ = [sessionInst setCategory:AVAudioSessionCategoryPlayback error:&amp;error];<br />
		if(error || !succ) {<br />
			NSLog(@&#8221;Unable to set AVAudioSessionCategoryPlayback&#8221;);<br />
		}<br />
	NSError* outError = nil;<br />
	succ = [sessionInst setActive:YES error:&amp;outError];<br />
	if(outError || !succ) {<br />
		NSLog(@&#8221;Unable to setActive&#8221;);<br />
	}</p>
<p>Thanks,</p>
<p>&#8211;MB.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

