# Strange Variable Bitrate(VBR) bug

**URL:** <https://forum.kirupa.com/t/strange-variable-bitrate-vbr-bug/295204>\
**Category:** Uncategorized\
**Created:** [August 26, 2009, 3:36pm UTC](https://forum.kirupa.com/t/strange-variable-bitrate-vbr-bug/295204 "2009-08-26T15:36:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![getbrutal](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@getbrutal](https://forum.kirupa.com/u/getbrutal)\
**Post date:** [August 26, 2009, 3:36pm UTC](https://forum.kirupa.com/t/strange-variable-bitrate-vbr-bug/295204/1 "2009-08-26T15:36:19Z")

</div>

Hey guys, thanks for taking a sec to view my post.

The issue here is I have an mp3player: [http://www.kovo.ca/alex/bin/testing/mp3player](http://www.kovo.ca/alex/bin/testing/mp3player) , and there are 5 songs, 3 of which are Constant Bitrate (CBR) and two of which are Variable Bitrate(VBR).

Songs 1, 2 & 5 are CBR, 2 and 3 are VBR… Once you press play on a VBR the scrubber goes haywire and totally un aligned, although the CBR runs smooth…

The code for my scrubber is as follows:

Event handler handling scrubbing:

```auto

stage.addEventListener(Event.ENTER_FRAME, updateScrubber);

```

and the updateScrubber function:

```auto

private function updateScrubber(e:Event) {
            if((100*(song.bytesLoaded/song.bytesTotal )) >= 2) {
                if(scrubbed){
                    return;
                } else {
                    var scrubPercent:Number = channel.position/song.length;
                    mc_scrubControl.mc_scrubBall.x = (scrubPercent*mc_scrubControl.mc_scrubBar.width)+6;
                }
            } 
        }

```

So… shouldn’t make a difference but it does…

It’s strange because VBR is a bitrate, although I don’t meddle with bit rates, just loaded bytes, total bytes, channel position and song length.
