chatmurai / mp3infoutil

Automatically exported from code.google.com/p/mp3infoutil
1 stars 0 forks source link

init test [ some mp3 is can't detected ] #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
private function init():void {
    MP3InfoUtil.getInfo("test.mp3")
    MP3InfoUtil.addEventListener(MP3InfoEvent.COMPLETE,evt_mi)
    MP3InfoUtil.addEventListener(MP3InfoEvent.ERROR,evt_mier)
}
private function evt_mier(e:MP3InfoEvent):void {
    trace( "evt_mier : " + evt_mier );
    trace(e.info)
    for( var i:String in e.info ) trace( "key : " + i + ", value : " + e.info[
i ] );
}
private function evt_mi(e:MP3InfoEvent):void {
    trace( "evt_mi : " + evt_mi );
    trace(e.info)
    for( var i:String in e.info ) trace( "key : " + i + ", value : " + e.info[
i ] );
}

Original issue reported on code.google.com by zszen.john on 13 Mar 2010 at 7:11

GoogleCodeExporter commented 9 years ago
Couls you possibly provide test.mp3? A similar issue was reported by another 
user who
thinks it might be related to ID3v2.

In lieu of actual mp3s, writing the 44byte+ header bytearray of known failing 
files
to a log file of some kind would be extremely helpful as well. 

You could use either of the following methods to dump header bytes to a log 
file:

//========================
// Flash Player (10+)
//========================

// using flash.net.FileReference
function someButtonClickHanlder( event:MouseEvent ):void
{
  _fileReference.save(_bytes):void
}

//========================
// Adobe AIR 
//========================

// using flash.filesystem.File
function writeMyLogBytes( headerBytes:ByteArray ):void
{
    _myFileInstance.writeBytes(headerBytes, headerBytes.bytesAvailable );
}

// -OR-

// using Flash.filesystem.FileStream
function writeMyLogBytesFileStream( headerBytes:ByteArray ):void
{
    _MyFileStreamInstance.open(_myFileInstance, "write" );
    _MyFileStreamInstance.writeBytes(headerBytes, headerBytes.bytesAvailable );
}

Original comment by beatportscott@gmail.com on 20 Mar 2010 at 10:10