18 May '13 - 21:39 *
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: MP3 playback stopped  (Read 879 times)
djfx79
Posts: 10


« on: 6 Jan '12 - 11:37 »
Reply with quoteQuote

Hi,

I'm working on a simple (I'm a beginner in C# programming  Embarrassed) mp3 player using Bass.Net (thank you for the amazing work) and I don't know why but for one specific track the playback stops always after 14 seconds.

When I play this track (MP3, CBR, 160 kbps) with winamp the playback works but I hear a little disruption at 14 seconds.

Do you have an idea concerning the origin of the playback break ? A decoding problem maybe ?

Is there a way to ask bass to jump to the next track if the playback is stopped involuntarily (not by a specific sync or button action) ?

Thanks in advance and congratulations for your work  Wink.

Dj fx79.
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 6 Jan '12 - 15:26 »
Reply with quoteQuote

That sounds like the file may have a large gap in the MP3 data, which is resulting in the MP3 decoder ending the stream early. That gap detection was tweaked slightly recently, so you could give the latest stuff a try...

   www.un4seen.com/stuff/bass.dll

If the problem still happens, you could try disabling the gap detection like this...

#define BASS_CONFIG_MP3_ERRORS 35
BASS_SetConfig(BASS_CONFIG_MP3_ERRORS, 2);

And if the problem still happens after that, please upload the troublesome file to have a look at here...

   ftp.un4seen.com/incoming/
Logged
djfx79
Posts: 10


« Reply #2 on: 17 Jan '12 - 21:36 »
Reply with quoteQuote

Thanks a lot I will git it a try.

Cheers,

Dj Fx79
Logged
djfx79
Posts: 10


« Reply #3 on: 18 Jan '12 - 18:01 »
Reply with quoteQuote

Hi Ian,

I've tested the modification of the error detection setting but it has no effect on my problem so I've uploaded the track : "Kylie Minogue - More More More.

Thanks for your help,

Djfx79.
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #4 on: 19 Jan '12 - 16:32 »
Reply with quoteQuote

Trying it here, the updated BASS.DLL above seems to fix the problem with your file. Are you sure you tried that; perhaps you didn't put it in your executable's directory? You can use BASS_GetVersion to confirm what BASS.DLL version is being loaded.
Logged
djfx79
Posts: 10


« Reply #5 on: 19 Jan '12 - 19:05 »
Reply with quoteQuote

Hi Ian,

you're totally right : this new version solves the problem... When you copy Bass.dll to the right directories (sorry  Embarrassed).

Thanks a lot for your help,

cheers,

dj fx79
Logged
djfx79
Posts: 10


« Reply #6 on: 26 Jan '12 - 19:25 »
Reply with quoteQuote

Hi,

sorry to ennoy you again but I have a new problem : when I compare the duration of some tracks between Bass.net and winamp I find huge differences. For one track I have a duration which is 25 seconds shorter with winamp than Bass.net.

It gives me some errors because suddently the duration changes when I play such tracks with bass.net. At the begginning of the playback I have a duration of 2m31s and at 2m05 the playback stops and bass.net gives me a new length equals now to 2m5s. All my sync based on the pos of the playback don't work due to such variations.

Thanks in advance,

djfx79

Logged
djfx79
Posts: 10


« Reply #7 on: 26 Jan '12 - 19:45 »
Reply with quoteQuote

Hi again,

it seems that with the "BassFlag.BASS_STREAM_PRESCAN" option it's ok.

Sorry to have disturbed you before having read the forum.

Cheers,

djfx79.
Logged
djfx79
Posts: 10


« Reply #8 on: 27 Jan '12 - 07:10 »
Reply with quoteQuote

Hi,

Now I'm using the "PRESCAN" to get the right length of the channel.

I add this channel to a mixer and I create a sync to get a new channel added to the mixer as soon as the previous channel reaches a specific position.

With the "PRESCAN" used to create each of these channels, I clearly hear a skip as soon as the sync function is launched.

Can you help me (again) for this please.

Regards,

dj fx79
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #9 on: 27 Jan '12 - 18:07 »
Reply with quoteQuote

Yep, the PRESCAN flag tells BASS_StreamCreateFile to scan the entire file to get precise seek points (and length), which means that the call will take longer than otherwise. That can be a problem if you're trying to start playing the new stream as soon as possible, eg. upon a sync. To avoid that, you will probably need to make the BASS_StreamCreateFile call some time in advance (eg. in a worker thread), ready for the SYNCPROC to just add it to the mixer.

Regarding streams ending sooner than expected (when not using the PRESCAN flag), to handle that you could also set a BASS_SYNC_END sync for safety, in case playback never reaches your BASS_SYNC_POS sync. That way you can at least advance to the next track, even if it is without a crossfade (which I guess is what you're using the POS sync for?).
Logged
djfx79
Posts: 10


« Reply #10 on: 28 Jan '12 - 07:44 »
Reply with quoteQuote

OK Ian,

thanks for your help.

Your totally right, I want to make a "fade in" effect of the ne next track to mix it with the previous one so the SYNC_END is a little violent  Wink in this case but it's sure that it will prevent my application to crash.

So, I will add a SYNC_END for safety and what I will do is to preload the next track as soon as the previous one is playing.

Thanks a lot,

djfx79.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines