Re: [flexcoders] SoundChannel position misreporting

2008-08-13 Thread Mark Carter

There is already a bug about this:

http://bugs.adobe.com/jira/browse/FP-33

The last comment says it might be fixed in the latest Flash Player 10
pre-release (beta 2, version 10,0,0,525) from early July...

I'll try to check this soon...
-- 
View this message in context: 
http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18963918.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] SoundChannel position misreporting

2008-07-29 Thread Mark Carter

I also have this problem.

If i call the play Sound play() method with the position 1, then play
begins at 20secs.

In general if I specify a value of X, then play will begin at 2X
milliseconds from the beginning.

I have tried it with 64kbps and 32kbps mp3, FWIW.

What am I doing wrong!?
-- 
View this message in context: 
http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18704719.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] SoundChannel position misreporting

2008-07-29 Thread Toby Ashley
Double check the sample rate of the sound file (not the bitrate). I recently
fixed a problem in an Actionscript 2 project, so relevant to the previous
AVM, where this exact problem was happening with MP3s using a sample rate
which wasn't 44200, 22100 or 11050Hz. Haven't come across it in AVM2 yet,
but it may still be an issue. Another side effect seems to be that one some
machines (but not all - even those with same versions of Flash Player),
audio with a 'non supported' sample rate can play back at double speed.

Bit more information here if it's relevant -
http://lowpitch.com/blog/2008/07/27/flash-plays-mp3s-back-at-double-speed-why/



On Tue, Jul 29, 2008 at 4:54 AM, Mark Carter [EMAIL PROTECTED] wrote:


 I also have this problem.

 If i call the play Sound play() method with the position 1, then play
 begins at 20secs.

 In general if I specify a value of X, then play will begin at 2X
 milliseconds from the beginning.

 I have tried it with 64kbps and 32kbps mp3, FWIW.

 What am I doing wrong!?
 --
 View this message in context:
 http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18704719.html
 Sent from the FlexCoders mailing list archive at Nabble.com.


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






Re: [flexcoders] SoundChannel position misreporting

2008-07-29 Thread Mark Carter

The two mp3s I tried are both 22050Hz.

(of course, sample rate is far more relevant than bit rate - I must have
been half dead when I wrote that earlier!)

The playback itself is completely fine - not double speed. Its just the
position value...

Ok, so I've done so more experimenting:

If I play from position 0, everything is fine. The position value of the
SoundChannel is updated correctly (normal speed).

Now suppose I stop the soundchannel at position 5000. If I then use this
position in the play() method, it will start at 10secs (real offset, not
flex position) instead of 5secs. The position value is still 5000 and
increases in realtime as the sound is played.

So it seems that the only problem is in the play(position) method where the
position is greater than zero. If this started playback at the correct
position, then everything else would work nicely.

Just tried it with a 44100Hz mp3 and there is no problem with that at all...
-- 
View this message in context: 
http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18711747.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] SoundChannel position misreporting

2008-07-29 Thread Toby Ashley
Interesting... I'll test our findings again with some 22050Hz MP3s just to
make sure it's working for us. When we we testing this the other day, it was
files using 32000Hz (or something) sample rate that were causing problems,
those at 44100,22050 and 11025 were fine. This was in AVM1 though, which may
make a difference.

Very interested to hear if you find a solution.

On Tue, Jul 29, 2008 at 2:08 PM, Mark Carter [EMAIL PROTECTED] wrote:


 The two mp3s I tried are both 22050Hz.

 (of course, sample rate is far more relevant than bit rate - I must have
 been half dead when I wrote that earlier!)

 The playback itself is completely fine - not double speed. Its just the
 position value...

 Ok, so I've done so more experimenting:

 If I play from position 0, everything is fine. The position value of the
 SoundChannel is updated correctly (normal speed).

 Now suppose I stop the soundchannel at position 5000. If I then use this
 position in the play() method, it will start at 10secs (real offset, not
 flex position) instead of 5secs. The position value is still 5000 and
 increases in realtime as the sound is played.

 So it seems that the only problem is in the play(position) method where the
 position is greater than zero. If this started playback at the correct
 position, then everything else would work nicely.

 Just tried it with a 44100Hz mp3 and there is no problem with that at
 all...
 --
 View this message in context:
 http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18711747.html
 Sent from the FlexCoders mailing list archive at Nabble.com.


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






Re: [flexcoders] SoundChannel position misreporting

2008-07-29 Thread Mark Carter


Toby Ashley wrote:
 
 Very interested to hear if you find a solution.
 

Sure, will do although I think any workaround will be to check the sample
rate in the ID tag and then scale the position accordingly.

BTW, the length field is always correct. Therefore, if you use a progress
bar (using the position and length fields), when the sound file finishes,
the progress indicator could be anywhere from half way (play started just
before end of file) to extreme right (play started at beginning of file).

If you call play() with a position = half the length, then nothing is
played.

-- 
View this message in context: 
http://www.nabble.com/SoundChannel-position-misreporting-tp14232861p18713472.html
Sent from the FlexCoders mailing list archive at Nabble.com.