using mp3-free version of bass on raspberrypi still have the same problem with mp3 files.
OK, it doesn't appear to be an MP3 decoder issue then. You mentioned that the problem stops when you move to the next file. What about if you re-open the same file? Also, are you using any DSP/FX, eg. BASS_ChannelSetDSP/FX? If so, please try removing that, and see if the problem still happens then.
Bass for android uses OpenSL, as default audio output, which causes crackles and stutters on certain devices.
BASS uses ALSA on Linux and DirectSound on Windows. They are very different systems, so if the problem is happening with both, then it wouldn't appear to be related to the output system.
there is no dsp or fx on system
var result = this.basswrapper.BASS_Init(this.soundCard, 44100, this.basswrapper.BASS_Initflags.BASS_DEVICE_SPEAKERS);
var flags = this.basswrapper.BASSFlags.BASS_STREAM_DECODE | this.basswrapper.BASSFlags.BASS_SAMPLE_FLOAT ;
this.channel = this.basswrapper.BASS_StreamCreateFile(0, FileName, 0, 0, flags);
then we are adding the channel to a mixer .. (there are some other parts for announces etc..)
we use BASS_ChannelSetSync to get event for last xxxx second with BASS_SYNC_POS
and BASS_ChannelSlideAttribute to slide volume down or up using BASS_ATTRIB_VOL
also i tried usb sound cards and hifi-berry sound card (on raspberry pi 3). still we have the same problem. this means its not related to sound card.
let me describe the problem again, here are some investigations:
1- sometimes on any position of song, crackling begins and remains till the end of song. when we get to the next song it works as normal.
2- sometimes on any position of song, crackling begins and after random seconds on still the same song, playbacks returns to normal.
these 2 problems happens any time.. sometimes after 4-5 hours of playback, sometimes after 20 minutes of playback, sometimes never..
but i have now 2 raspberry pi devices having the problem in a day more then 2-3 times. so whenever you like, i can give you access to connect to device and see whats going on in it..
ps: one interesting issue i found is, when there is a mixer channel and a streamcreatefile channel, and channel added to mixer, when you get vumeter values from channel (not from mixer), the playback becomes faster. but when you get vumeter values from mixer channel, the playback is normal. i dont know if this is a problem or not, but accidently we found this.