Short audio clips cause playback to stop

Post Reply
jbeen
Posts: 11
Joined: Fri Jul 03, 2015 2:54 am

Short audio clips cause playback to stop

Post by jbeen » Sun Oct 18, 2015 7:17 am

Hello fellow listeners.

I'm running into a bit of a 'bug'.

Any audio clip shorter than 0:0.180 in duration will cause the stream to stop playing, as that clip 'hangs'.

I then need to click play on the next clip to get the stream going again.

This is happening with both Firefox on Windows (v41) & Chrome on Android (v46).

It only appears to be happening with those two browsers, which ironically are my two primary use cases.

(Chrome on Windows does not exhibit this behavior, nor do any browsers on the Mac platform.)

Looking at the console in Firefox, I see the following error:
Media resource http://radiocapture.com/audio/2015/10/1 ... 786011.mp3 could not be decoded.
(There is a file at the URI. It is only 2KB in size.)

Any thoughts on how this playback issue might be worked around, particularly on the Android browser, as having to restart the stream while driving isn't ideal?

Again, thanks for providing this service - I love being able to listen to specific DPD District traffic, on demand.

Regards,
Josh

f0urtyfive
Site Admin
Posts: 35
Joined: Sun Jul 08, 2012 1:50 am

Re: Short audio clips cause playback to stop

Post by f0urtyfive » Sun Oct 18, 2015 8:47 pm

Hrm, let me look at the code, I can try to see if I can somehow catch the exception in firefox or something. I've noticed this as well, but I wasnt sure if it was just me. Funny enough I actually wrote the original site using Firefox, and it definitely WASNT happening then, so I think this is a regression that some MP3 codec somewhere has caused.

f0urtyfive
Site Admin
Posts: 35
Joined: Sun Jul 08, 2012 1:50 am

Re: Short audio clips cause playback to stop

Post by f0urtyfive » Sun Oct 18, 2015 9:03 pm

Well, I have good news and bad news. The bad news is I have no idea how this terrible code works anymore (really, the radiocapture web code is really awful). The good news is because I can't figure out how to fix it, I just put a filter in the file upload process that theoretically should just delete any recording that is < 0.18 seconds, so theoretically, it might be fixed.

jbeen
Posts: 11
Joined: Fri Jul 03, 2015 2:54 am

Re: Short audio clips cause playback to stop

Post by jbeen » Sun Oct 18, 2015 11:57 pm

Thanks for the quick response. :)

Yes, I agree that's a good fix, and improves the overall quality of the listening experience, as those short clips seemed to just be noise anyway.

I did run into a couple clips tonight that were exactly 0:0.18 in duration, which stopped the stream on Android.

So, if you could tweak the filter to be < 0.19 seconds or < 0.2 seconds, I suspect it'll be fixed nicely.

Regards,
Josh

f0urtyfive
Site Admin
Posts: 35
Joined: Sun Jul 08, 2012 1:50 am

Re: Short audio clips cause playback to stop

Post by f0urtyfive » Mon Oct 19, 2015 12:03 am

Bumped to 0.19, I've been listening since I updated earlier and havent gotten any stalls in FF.

Post Reply