Skip to content

Commit

Permalink
Timing
Browse files Browse the repository at this point in the history
  • Loading branch information
leegee committed Nov 6, 2012
1 parent 0283e3f commit 49ffff0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Demo/index.html
Expand Up @@ -63,7 +63,6 @@
</head> </head>


<body> <body>

<header> <header>
<h1>PcmImage for MooTools / HTML5</h1> <h1>PcmImage for MooTools / HTML5</h1>
</header> </header>
Expand Down Expand Up @@ -117,7 +116,7 @@ <h2>Soundfile PCM Wave Visualisation</h1>
with an <code>img</code> element, which results in with an <code>img</code> element, which results in
the loss of the dynamic overlay. the loss of the dynamic overlay.
</p> </p>

<!-- <!--
<figure> <figure>
<figcaption> <figcaption>
Expand All @@ -130,7 +129,7 @@ <h2>Soundfile PCM Wave Visualisation</h1>
></div> ></div>
</figure> </figure>
--> -->

<figure> <figure>
<figcaption> <figcaption>
<p>HTML default, style from class:</p> <p>HTML default, style from class:</p>
Expand Down
12 changes: 8 additions & 4 deletions Source/PcmImage.js
Expand Up @@ -296,11 +296,15 @@ var PcmImage = new Class({
this.overlay.lastX = this.overlay.inc * -1; this.overlay.lastX = this.overlay.inc * -1;
this.overlay.thisX = 0; this.overlay.thisX = 0;


this.overlay.inc /= 1.8; // nearly // Why? What's wrong with my maths?
this.overlay.inc /= 1.666666666666; // nearly


//console.log( this.width ); /*
//console.log( this.buffer.duration * 1000); console.log( 'width '+this.width );
//console.log( this.overlay.inc * this.overlayInterval); console.log( 'duration '+(this.buffer.duration * 1000));
console.log( this.overlay.inc +' * '+ this.overlayInterval +' = ');
console.log( this.overlayInterval * this.overlay.inc );
*/


this.renderTimer = this.overlayImg.periodical( this.renderTimer = this.overlayImg.periodical(
this.overlayInterval, this.overlayInterval,
Expand Down

0 comments on commit 49ffff0

Please sign in to comment.