23 May '13 - 17:28 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Chopping after long streaming session  (Read 604 times)
Bevinsky
Posts: 5


« on: 10 Oct '11 - 19:27 »
Reply with quoteQuote

Hello, I've developed a program that uses Bass.Net to connect to a Shoutcast server and stream on-the-fly encoded MP3 to it. It uses LAME for the encoding.

I'm getting reports from my users about a problem where, if the streaming has been going on for a while (say, a few hours), there's suddenly chopping and skipping in the playback from the Shoutcast server. The chopping is also present on the streamer's side, though not as prevalent.

Any ideas what might be wrong? Could it be LAME or Bass? I can provide code excerpts if desired (as terrible as the code may be Cheesy).

Thanks in advance, Bevinsky
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #1 on: 11 Oct '11 - 17:58 »
Reply with quoteQuote

For some ideas of what may be going wrong, please post the code that you're using the setup the encoder and its source. Also confirm that you are using the latest BASS and add-on versions.
Logged
jaromanda
Posts: 22


« Reply #2 on: 15 Oct '11 - 04:53 »
Reply with quoteQuote

It happens after about 3 hours, 23 minutes when recording (i.e. BASS_Record) at 44.1khz stereo 16bit samples ( - which equates to about 231 BYTES read - coincidence? In fact 231 would be reached at 3 hours 22 minutes 53.94 minutes

By the way, BASS 2.3 did not have this issue

Correction - I'm using BASS_SAMPLE_FLOAT - so:

a) the number of bytes read is actually 232
b) BASS 2.3 MAY have had the issue - back when 2.3 was being used, the program was using 16bit integer sample format, so the problem may occur after twice as long, I don't know

Still, it could be a coincidence
« Last Edit: 15 Oct '11 - 05:05 by jaromanda » Logged
jaromanda
Posts: 22


« Reply #3 on: 16 Oct '11 - 05:31 »
Reply with quoteQuote

Some further info that may help.

I took over maintaining edcast when oddsock took his site down. His code used BASS 2.3.

First thing I did was change to BASS 2.4

My new edcast has this issue for SOME people, but not all.

The old edcast does not have this issue at all.

So, the issue seems to be BASS 2.4 in combination with some audio drivers.

A note to the OP - I've worked around the issue by stop/starting the recording after 3hrs 22mins - actually, I count the number of bytes being read, when it gets to 0xFF000000, I stop/start the recording - there may be a slight audio glitch, but this is internet radio Wink

note: I do not pause/resume the recording, I do the following
void restartRecording()
{
int dev = BASS_RecordGetDevice();
BASS_RecordFree();
BASS_RecordInit(dev);
totalLength = 0UL;
BASS_RecordStart(44100, 2, BASS_SAMPLE_FLOAT, &BASSwaveInputProc, NULL);
}

To be honest, I don't know if the above is 100% correct
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #4 on: 17 Oct '11 - 15:11 »
Reply with quoteQuote

Please confirm the exact BASS.DLL version that you are using, and also the Windows version. What you describe looks very much like a Windows recording issue that BASS includes a workaround for, but which was disabled on Vista/7 in the 2.4.7 release as it was thought unnecessary. It was subsequently re-enabled in 2.4.8 Smiley
Logged
jaromanda
Posts: 22


« Reply #5 on: 17 Oct '11 - 22:07 »
Reply with quoteQuote

Well, that explains it I guess

I'm using 2.4.7.1
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines