PS3 Optical Digital Audio Cable

Finally got an optical digital audio cable aka TOSLINK cable to connect the PS3 to my budget audio receiver, a Samsung HT-Z320 home theater. Supposedly this should give me 5.1 audio. I plugged in the cable and configured the PS3 sound settings->audio output settings. I selected optical digital as the connector and selected Dolby Digital 5.1, DTS 5.1, AAC, PCM 2.0 44.1KHz, and PCM 2.0 48KHz (selected by default, can’t be deselected) output formats.

But for some reason, some movies had no sound. On thing I noticed is that these movies all have AAC audio. I checked the specifications of the HT-Z320 and indeed it doesn’t mention AAC. Just DTS and Dolby Digital. Well, like I said, it’s a budget audio receiver. So I unselected AAC on the PS3 and tried playing the movies again. Voila! I now have audio!

What happened is that since AAC is not checked, the PS3 automatically converted the AAC data to PCM 2.0. And from PCM 2.0, the HT-Z320 can convert it to 5.1 audio via Pro Logic II. Not as good as true AAC 5.1 I’m sure. But certainly less expensive which is fine enough with me.

WDS: Bridging Wireless Networks

I had my PS3 and Linkstation on a wired gigabit subnet because I wanted the PS3 to be able to stream HD content from the Linkstation. But I also needed the PS3 to have Internet access and the Linkstation to be accessible by wireless devices.

First, I tried connecting my Huawei D100 router to the switch but it couldn’t find any HSDPA signal. Sun’s signal is still spotty and weak in some areas and finicky elsewhere.  So I guess the D100 has to be in the bedroom where the signal is strongest.

Read More

Flex: Security Error Accessing URL Part 2

I previously encountered this error when I was working only within my own development box (laptop actually) and I basically worked around the error. But now, I need my Flex Web Service client separate from my Web Service. when you are in this situation, you need to have a crossdomain.xml file in your host’s root directory:

<cross-domain-policy>
<site-control permitted-cross-domain-policies=”master-only”/>
<allow-access-from domain=”yourdomain”/>
<allow-http-request-headers-from domain=”yourdomain” headers=”*”/>
</cross-domain-policy>

And if the host is a secure/HTTPS server, you just need to add the secure attribute:

<cross-domain-policy>
<site-control permitted-cross-domain-policies=”master-only”/>
<allow-access-from domain=”yourdomain” secure=”false”/>
<allow-http-request-headers-from domain=”yourdomain” headers=”*” secure=”false”/>
</cross-domain-policy>

Flex: Custom HTML Wrappers In Ant

Building Flex using ant build files is generally straightforward. Unfortunately, this is not so with using custom HTML wrappers. You cannot use the html-wrapper task since this only uses the standard templates in Flex’s html-template folder. If you want to use your own index.template.html in your own html-template folder, you will need to use a workaround:

<macrodef name=”generateHtmlWrapper” description=”Generates HTML Wrapper using custom template”>
<attribute name=”file”/>
<attribute name=”title”/>
<attribute name=”application”/>
<attribute name=”swf”/>
<attribute name=”width”/>
<attribute name=”height”/>
<attribute name=”bgcolor”/>
<attribute name=”version-major”/>
<attribute name=”version-minor”/>
<attribute name=”version-revision”/><attribute name=”template”/> <attribute name=”output”/>

<sequential>
<copy todir=”@{output}/history”>
<fileset dir=”html-template/history”/>
</copy>             
<copy file=”html-template/AC_OETags.js” todir=”@{output}”/>
<copy file=”html-template/playerProductInstall.swf” todir=”@{output}” />
<copy file=”html-template/index.template.html” tofile=”@{output}/@{file}” />

<replace file=”@{output}/@{file}” token=”$${title}” value=”@{title}”/>
<replace file=”@{output}/@{file}” token=”$${swf}” value=”@{swf}”/>
<replace file=”@{output}/@{file}” token=”$${width}” value=”@{width}”/>
<replace file=”@{output}/@{file}” token=”$${height}” value=”@{height}”/>
<replace file=”@{output}/@{file}” token=”$${bgcolor}” value=”@{bgcolor}”/>
<replace file=”@{output}/@{file}” token=”$${application}” value=”@{application}”/>
<replace file=”@{output}/@{file}” token=”$${version_major}” value=”@{version-major}”/>
<replace file=”@{output}/@{file}” token=”$${version_minor}” value=”@{version-minor}”/>
<replace file=”@{output}/@{file}” token=”$${version_revision}” value=”@{version-revision}”/>
</sequential>
</macrodef>

Thanks to Renaun Erickson for the solution!

Flex: Unable To Open Locale

When you’re working with locales in Flex, you would put in the following code in you ant build file:

<mxmlc>
<locale>it_IT</locale>
<source-path path-element=”locale/it_IT”/>
<include-resource-bundles>formlabels</include-resource-bundles> <source-path path-element=”${FLEX_HOME}/frameworks”/> <output>bin/formlabels_it_IT.swf</output>
</mxmlc>

Then when you get a puzzling error:

[mxmlc] C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\flex-config.xml(75): Error: unable to open ‘locale/it_IT’

But don’t you have that exact directory? Well, apparently Flex is actually looking for the it_IT folder in its locale folder. The solutions is to just create an empty it_IT folder:

<macrodef name=”compileLocale” description=”Compiles the Resource package for the given locale”>
<attribute name=”locale” default=”en_US”/>
<attribute name=”outputdir” default=”bin-debug”/>
<sequential>
<!– Create the Flex Home directory for the language in question. This is necessary to compensate for a bug in pre-3.2 releases of mxmlc. –>
<mkdir dir=”${FLEX_HOME}/frameworks/locale/@{locale}”/>

<!– Invoke MXMLC –> <mxmlc> <locale>@{locale}</locale> <source-path path-element=”locale/{locale}”/> <include-resource-bundles>formlabels</include-resource-bundles> <source-path path-element=”${FLEX_HOME}/frameworks”/> <output>@{outputdir}/formlabels_@{locale}.swf</output>
</mxmlc>
</sequential>
</macrodef>

Thanks to Adobe Cookbooks for the solution!