<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Matthew van Eerde's web log : Movies</title><link>http://blogs.msdn.com/matthew_van_eerde/archive/tags/Movies/default.aspx</link><description>Tags: Movies</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Sample - WASAPI exclusive-mode event-driven playback app, including the HD Audio alignment dance</title><link>http://blogs.msdn.com/matthew_van_eerde/archive/2009/04/03/sample-wasapi-exclusive-mode-event-driven-playback-app-including-the-hd-audio-alignment-dance.aspx</link><pubDate>Fri, 03 Apr 2009 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9530748</guid><dc:creator>Maurits</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/matthew_van_eerde/comments/9530748.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matthew_van_eerde/commentrss.aspx?PostID=9530748</wfw:commentRss><description>&lt;P&gt;Attached to this post is a sample WASAPI exclusive-mode event-driven playback app, including amd64 and x86 binaries, source, and a modification of the ac3.wav Dolby Digital test tone&amp;nbsp;to include a "fact" chunk.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&amp;gt;play-exclusive.exe -?&lt;BR&gt;play-exclusive.exe -?&lt;BR&gt;play-exclusive.exe --list-devices&lt;BR&gt;play-exclusive.exe [--device "Device long name"] --file "WAV file name"&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -? prints this message.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --list-devices displays the long names of all active playback devices.&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;Plays the given file to the given device in WASAPI exclusive mode.&lt;BR&gt;If no device is specified, plays to the default console device.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;On the particular system I used to test this, these are the devices I have:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&amp;gt;play-exclusive.exe --list-devices&lt;BR&gt;Active render endpoints found: 3&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Digital Audio (S/PDIF) (2- High Definition Audio Device)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Speakers (2- High Definition Audio Device)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sceptre (High Definition Audio Device)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And this is the output I get when I play the attached ac3.wav test tones to the Sceptre&amp;nbsp;HDMI output:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&lt;BR&gt;&amp;gt;play-exclusive --device "Sceptre (High Definition Audio Device)" --file ac3.wav&lt;BR&gt;Opening .wav file "ac3.wav"...&lt;BR&gt;The default period for this device is 30000 hundred-nanoseconds, or 144 frames.&lt;SPAN style="BACKGROUND-COLOR: yellow"&gt;&lt;BR&gt;Buffer size not aligned - doing the alignment dance.&lt;BR&gt;Trying again with periodicity of 33333 hundred-nanoseconds, or 160 frames.&lt;BR&gt;We ended up with a period of 33333 hns or 160 frames.&lt;/SPAN&gt;&lt;BR&gt;Successfully played all 460800 frames.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A word on the "alignment dance" highlighted above... first, this scene from &lt;EM&gt;&lt;A class="" href="http://www.imdb.com/title/tt0395699/" mce_href="http://www.imdb.com/title/tt0395699/"&gt;The Pacifier&lt;/A&gt;&lt;/EM&gt;.&amp;nbsp; (Vin Diesel is so coordinated.)&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://www.imdb.com/rg/VIDEO_PLAY/LINK//video/screenplay/vi3988848921/" mce_href="http://www.imdb.com/rg/VIDEO_PLAY/LINK//video/screenplay/vi3988848921/"&gt;&lt;STRONG&gt;The Pacifier: The Peter Panda dance&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here's the source for the dance (in play.cpp in the attached.)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;// call IAudioClient::Initialize the first time&lt;BR&gt;// this may very well fail&lt;BR&gt;// if the device period is unaligned&lt;BR&gt;hr = pAudioClient-&amp;gt;Initialize(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUDCLNT_SHAREMODE_EXCLUSIVE,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUDCLNT_STREAMFLAGS_EVENTCALLBACK,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hnsPeriod, hnsPeriod, pWfx, NULL&lt;BR&gt;);&lt;BR&gt;// if you get a compilation error on AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED,&lt;BR&gt;// uncomment the #define below&lt;BR&gt;//#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED&amp;nbsp;AUDCLNT_ERR(0x019)&lt;BR&gt;if (&lt;SPAN style="BACKGROUND-COLOR: yellow"&gt;AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED&lt;/SPAN&gt; == hr) {&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if the buffer size was not aligned, need to do the alignment dance&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Buffer size not aligned - doing the alignment dance.\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the buffer size, which will be aligned&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = pAudioClient-&amp;gt;GetBufferSize(&amp;amp;nFramesInBuffer);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hr)) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("IAudioClient::GetBufferSize failed: hr = 0x%08x\n", hr);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return hr;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // throw away this IAudioClient&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pAudioClient-&amp;gt;Release();&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // calculate the new aligned periodicity&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hnsPeriod = // hns =&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (REFERENCE_TIME)(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10000.0 * // (hns / ms) *&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000 * // (ms / s) *&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nFramesInBuffer / // frames /&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pWfx-&amp;gt;nSamplesPerSec&amp;nbsp; // (frames / s)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + 0.5 // rounding&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // activate a new IAudioClient&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = pMMDevice-&amp;gt;Activate(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __uuidof(IAudioClient),&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLSCTX_ALL, NULL,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void**)&amp;amp;pAudioClient&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hr)) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("IMMDevice::Activate(IAudioClient) failed: hr = 0x%08x\n", hr);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return hr;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // try initialize again&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Trying again with periodicity of %I64u hundred-nanoseconds, or %u frames.\n", hnsPeriod, nFramesInBuffer);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = pAudioClient-&amp;gt;Initialize(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUDCLNT_SHAREMODE_EXCLUSIVE,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUDCLNT_STREAMFLAGS_EVENTCALLBACK,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hnsPeriod, hnsPeriod, pWfx, NULL&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hr)) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("IAudioClient::Initialize failed, even with an aligned buffer: hr = 0x%08x\n", hr);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pAudioClient-&amp;gt;Release();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return hr;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;} else if (FAILED(hr)) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("IAudioClient::Initialize failed: hr = 0x%08x\n", hr);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pAudioClient-&amp;gt;Release();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return hr;&lt;BR&gt;}&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;// OK, IAudioClient::Initialize succeeded&lt;BR&gt;// let's see what buffer size we actually ended up with&lt;BR&gt;hr = pAudioClient-&amp;gt;GetBufferSize(&amp;amp;nFramesInBuffer);&lt;BR&gt;if (FAILED(hr)) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("IAudioClient::GetBufferSize failed: hr = 0x%08x\n", hr);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pAudioClient-&amp;gt;Release();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return hr;&lt;BR&gt;}&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace"&gt;// calculate the new period&lt;BR&gt;hnsPeriod = // hns =&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (REFERENCE_TIME)(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10000.0 * // (hns / ms) *&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000 * // (ms / s) *&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nFramesInBuffer / // frames /&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pWfx-&amp;gt;nSamplesPerSec&amp;nbsp; // (frames / s)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + 0.5 // rounding&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-FAMILY: monospace" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Note the new HRESULT.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HD Audio works on a 128-byte aligned buffer size.&amp;nbsp; This dance ensures that the HD Audio driver is being fed data in chunks of 128 bytes.&amp;nbsp; It is somewhat complicated by the fact that IAudioClient::Initialize takes a parameter of hundred-nano-seconds, but IAudioClient::GetBufferSize sets a parameter of frames.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9530748" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/matthew_van_eerde/attachment/9530748.ashx" length="356346" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/matthew_van_eerde/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.msdn.com/matthew_van_eerde/archive/tags/Movies/default.aspx">Movies</category><category domain="http://blogs.msdn.com/matthew_van_eerde/archive/tags/Win32/default.aspx">Win32</category></item><item><title>Blown movie lines - Casablanca</title><link>http://blogs.msdn.com/matthew_van_eerde/archive/2008/06/02/blown-movie-lines-casablanca.aspx</link><pubDate>Tue, 03 Jun 2008 03:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8570660</guid><dc:creator>Maurits</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/matthew_van_eerde/comments/8570660.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matthew_van_eerde/commentrss.aspx?PostID=8570660</wfw:commentRss><description>&lt;p&gt;Ah... &lt;i&gt;&lt;a href="http://www.imdb.com/title/tt0034583/" mce_href="http://www.imdb.com/title/tt0034583/"&gt;Casablanca&lt;/a&gt;.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://blogs.msdn.com/photos/matthew_van_eerde/images/8570646/original.aspx" mce_src="http://blogs.msdn.com/photos/matthew_van_eerde/images/8570646/original.aspx" height="216" width="214"&gt;&lt;/p&gt;
&lt;p&gt;Arguably the best movie of all time.&amp;nbsp; And yet a blown line?&amp;nbsp; How could I be so bold?&lt;/p&gt;
&lt;p&gt;The line:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Play it [&lt;i&gt;As Time Goes By&lt;/i&gt;] again, Sam. -- &lt;i&gt;Casablanca&lt;/i&gt;&lt;a href="http://www.imdb.com/title/tt0034583/" mce_href="http://www.imdb.com/title/tt0034583/"&gt;&lt;i&gt;&lt;/i&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Wow... &lt;i&gt;that&lt;/i&gt; line, blown?&amp;nbsp; Am I way off base here?&amp;nbsp; Arguably the best line of arguably the best movie... blown?&amp;nbsp; How so?&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Well, for two reasons.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;The line does not actually appear in the movie at all.&lt;br&gt;&lt;/b&gt;&lt;br&gt;There are two scenes where Sam is urged to play &lt;i&gt;As Time Goes By&lt;/i&gt; to recall the Paris romance between the two major characters.&amp;nbsp; Here is the dialog from both scenes:&lt;br&gt;&lt;br&gt;Ilsa: Play it once, Sam. For old times' sake.&lt;br&gt;Sam: I don't know what you mean, Miss Ilsa.&lt;br&gt;Ilsa: Play it, Sam. Play "As Time Goes By."&lt;br&gt;&lt;br&gt;... and later...&lt;br&gt;&lt;br&gt;Rick: You played it for her, you can play it for me!&lt;br&gt;Sam: Well, I don't think I can remember...&lt;br&gt;Rick: If she can stand it, I can! Play it!&lt;br&gt;&lt;br&gt;"Play it again, Sam" has thus entered the pantheon of unforgettable movie lines... even though it was &lt;i&gt;never actually said&lt;/i&gt;.&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;The song was nearly changed.&lt;/b&gt;&lt;br&gt;&lt;br&gt;The film composer - a fellow named &lt;a href="http://www.imdb.com/name/nm0000070/" mce_href="http://www.imdb.com/name/nm0000070/"&gt;Max Steiner&lt;/a&gt; - did a very good job on the film.&amp;nbsp; &lt;i&gt;As Time Goes By&lt;/i&gt; is, thanks to his score, now indelibly etched in the ears of many a classic movie buff.&lt;br&gt;&lt;br&gt;&lt;i&gt;But he hated the song!&lt;/i&gt;&amp;nbsp; He attempted to convince the producers of the film that the song was boring, and that he could write a much better song.&lt;br&gt;&lt;br&gt;Shame, Mr. Steiner.&amp;nbsp; Shame.&lt;br&gt;&lt;br&gt;What's worse... &lt;i&gt;the producers went along with it!&lt;/i&gt; They agreed to allow him to write a song to replace &lt;i&gt;As Time Goes By.&lt;/i&gt;&amp;nbsp; There were only a couple of scenes that needed to be reshot, and they started the logistical machinery to recall the cast in those scenes to do the reshooting.&lt;br&gt;&lt;br&gt;Unfortunately... or rather, fortunately... Ingrid Bergman had already moved on to &lt;i&gt;&lt;a href="http://www.imdb.com/title/tt0035896/" mce_href="http://www.imdb.com/title/tt0035896/"&gt;For Whom The Bell Tolls&lt;/a&gt;&lt;/i&gt;... and she had &lt;i&gt;cut her hair&lt;/i&gt;...&lt;br&gt;&lt;br&gt;&lt;img src="http://blogs.msdn.com/photos/matthew_van_eerde/images/8570650/original.aspx" mce_src="http://blogs.msdn.com/photos/matthew_van_eerde/images/8570650/original.aspx" height="400" width="280"&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The topic of this arguably-best-line of the arguably-best-movie was thus saved by a haircut.&lt;br&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8570660" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/matthew_van_eerde/archive/tags/Movies/default.aspx">Movies</category></item><item><title>Blown movie lines - The Matrix</title><link>http://blogs.msdn.com/matthew_van_eerde/archive/2008/03/19/blown-movie-lines-the-matrix.aspx</link><pubDate>Wed, 19 Mar 2008 21:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8326067</guid><dc:creator>Maurits</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/matthew_van_eerde/comments/8326067.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matthew_van_eerde/commentrss.aspx?PostID=8326067</wfw:commentRss><description>&lt;p&gt;In the first Matrix movie there's a very interesting character called Cypher.&amp;nbsp; If you go along with the theory that the Matrix series is a rough retelling of the story of Christ, Cypher is the closest analog to Judas Iscariot, who is one of the earliest very-interesting-characters.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Unfortunately I personally found that the actor kind of got in the way of the character sometimes.&lt;br&gt;&lt;/p&gt;&lt;p&gt;For example, in his scene with Neo, Cypher has this line&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;The image translators work for the construct program - but there's way too much information to decode the Matrix.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The actor delivers this line in such a way (the image translators work &lt;i&gt;&lt;b&gt;for&lt;/b&gt;&lt;/i&gt; the construct program) as to imply that there are these thingies called "image translators", and this other thingy called a "construct program".&amp;nbsp; Furthermore, these "image translator" thingies are currently in the employ of the "construct program".&amp;nbsp; The "construct program" is apparently a very nasty beast with close ties to the machine &lt;i&gt;Gestapo&lt;/i&gt;.&amp;nbsp; Therefore, if we were so foolish as to attempt to recruit the talents of the "image translators", the "construct program" would find out, and then we'd be in &lt;i&gt;big trouble&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;It follows then, as the night the day, that we are thrown on our own, limited, resources... and what with piloting the ship and arranging the menu and what-not, decoding the matrix (being a substantial task) is rather low on the priority list.&lt;/p&gt;&lt;p&gt;Sigh.&lt;/p&gt;&lt;p&gt;This would be an interesting reading, filled with wonderful foreshadowings of the inevitable discovery of Zion by the machines, except for one thing.&lt;/p&gt;&lt;p&gt;It is already firmly established that the "construct program" is the Holodeck-like-thing that the crew of the Nebuchadnezzar use to equip themselves with simulated equipment (and simulated skills) for use in the simulated reality of the Matrix. So the above reading is, of course, nonsense.&amp;nbsp; The correct implication of the line is:&lt;/p&gt;&lt;p&gt;There are these thingies called "image translators."&amp;nbsp; We throw bits of code at them and they translate them into electrical stimuluses that our brain interprets as images.&amp;nbsp; They can handle such-and-such amount of code.&lt;/p&gt;&lt;p&gt;The construct program is under our control, and we scale back the amount of code it generates to what our image translators can handle.&amp;nbsp; That is why when you enter the construct program you can "see" your residual self-image and whatnot.&lt;/p&gt;&lt;p&gt;However, the Matrix is not under our control, so we can't scale the amount of code it generates.&amp;nbsp; It so happens that the Matrix generates an &lt;i&gt;awful lot&lt;/i&gt; of code, which overpowers our image translators... which is why these monitors just show a bunch of greenish symbols instead of pretty girls with hair of various colors.&lt;br&gt;&lt;/p&gt;&lt;p&gt;A delivery that gets this across would be more like&lt;/p&gt;&lt;blockquote&gt;The image translators work - &lt;i&gt;for the construct program&lt;/i&gt; - but there's way too much information to decode &lt;i&gt;the Matrix&lt;/i&gt;.&lt;br&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8326067" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/matthew_van_eerde/archive/tags/Movies/default.aspx">Movies</category></item></channel></rss>