Open GoogleCodeExporter opened 9 years ago
I have the same problem, Please fix~
Original comment by deng...@gmail.com
on 24 Apr 2011 at 8:38
I have found a work-around by placing the mp3 encoder in a separate .swf and
dynamically loading it.
Original comment by boris.re...@gmail.com
on 24 Apr 2011 at 8:53
I found a solution, move WAVE byteArray position to 0 , and everythings work
fine~
Original comment by deng...@gmail.com
on 26 Apr 2011 at 10:17
Hi deng....@gmail.com,
can you please send me the sample files that is working for you.
please fined attached files I am trying.
Thanks
Pradeep
Original comment by pradeepk...@gmail.com
on 13 Jul 2011 at 5:39
Attachments:
[deleted comment]
hello, I also had the RangeError issue and was able to workaround them.
With try catch's I and my debugger I got to the source of the problem.
The error is caused by the cshine.update() call in the update / progressloop on
a too freaquent basis.
You can kill 80% of the RangeErrors by editing the timing of the call to the
ShineMP3Encoder.update() function:
A second improvement which solidifies the class and clib errors by another 20%
is calling the update() less frequent, so in the start() function change:
*********
ORIGINAL
*********
timer = new Timer(1000/30); //(or 33)
timer.addEventListener(TimerEvent.TIMER, update);
*****
NEW:
*****
timer = new Timer(150);
timer.addEventListener(TimerEvent.TIMER, update);
------------
Secondly catch'm and convert percent:int topercent:*:
*********
Original:
*********
private function update(event : TimerEvent) : void {
var percent:int = cshine.update();
....
}
*****
NEW:
*****
private function update(event : TimerEvent) : void {
try {
//loose the percent INT type and replace it by *
var percent:* = cshine.update();
}catch(e:Error) {
trace("ShineMP3Encoder::update : cshine.update() error:" + e.message));
}
....
}
------------
Some testing:
------------
With above changes I was able to compress the *same* microphone wave info of 1
minute length 100 times in a row without any error!
Even if an error fires from cshine.update(), The try / catch will handle it and
compressing goes on.
Used classes to get me the WAVE:
org.bytearray.micrecorder.encoder.WaveEncoder
org.bytearray.micrecorder.MicRecorder
------------
Hints (and a big thank you) for master KIKKO:
*********************************************
I'm not a C programmer, but I was able to pinpoint the error in the C code,
it's the assert(l) function...for some reasn I don't know, but the code
comments tell me enough:
line 336 here:
http://code.google.com/p/flash-kikko/source/browse/shineMP3_alchemy/lib/shine/fo
rmatBitstream.c?r=4
static MYSideInfo*
get_side_info()
{
side_info_link *f = side_queue_free;
side_info_link *l = side_queue_head;
/*
If we stop here it means you didn't provide enough
headers to support the amount of main data that was
written.
*/
assert( l );
/* update queue head */
side_queue_head = l->next;
......
}
Cheers,
Stijn De Ryck
Original comment by zetm...@gmail.com
on 19 Nov 2011 at 5:32
Original issue reported on code.google.com by
boris.re...@gmail.com
on 20 Sep 2010 at 4:53