Author Topic: Quality improvement with BASS_SAMPLE_FLOAT?  (Read 131 times)

CvMaRTY

  • Posts: 14
Quality improvement with BASS_SAMPLE_FLOAT?
« on: 20 Nov '17 - 00:53 »
I have my old application in VB6 opening and playing files with a mixer to the output of a soundcard, without the BASS_SAMPLE_FLOAT flag. (i never used it in my VB6 app). Now that I am upgrading to .net, I used the BASS_SAMPLE_FLOAT flag wherever I could and i think I heard noticable quality improvement in the audio. Is this a fact or is it just my idea.

I had sometimes complaints from users of my VB6 app, that the audio was not so good. It was ok but not the best, or a little bit harsh, even when used with very good sound cards. compairing it with competing apps that reported better more "rich" sound.

What would be the recommendations for the best audio playback? To who do you leave the resampling job when a card by default uses a different sampling frequency than your audio file or app setup, and are there any tweaks (like resampling quality - i saw this somewhere). I dont care if it would need some more proccessor work, but I would love to give out the best sound around. :)

Do we also have better quality with ASIO besides latency, if all WDM proccessing was ideal?

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: Quality improvement with BASS_SAMPLE_FLOAT?
« Reply #1 on: 20 Nov '17 - 15:17 »
I would generally recommend using the BASS_SAMPLE_FLOAT flag on all streams. It will give improved quality with 24-bit files (the extra 8 bits will be lost otherwise), and can also give improved quality if you apply any DSP/FX. On almost all platforms (those with an FPU) the final output mixing is also done in floating-point, so it makes sense to keep the sample data floating-point all the way, particularly with lossy file formats (eg. MP3/OGG), which are usually decoded in floating-point.

If you're using standard BASS/DirectSound output on Windows, then the final output mixing will actually be done by Windows rather than BASS, but it is still done in floating-point (since Vista). Windows will also handle any necessary resampling then. If you use ASIO output, then you may be able to set the device's output rate to avoid any resampling, but when it's required you can have either BASSASIO or BASSmix handle resampling. I would suggest having BASSmix handle it, as it offers higher quality via the BASS_ATTRIB_SRC attribute. You can also have BASSmix handle resampling with standard BASS/DirectSound output, but the mixer may add latency then due to its playback buffer (see BASS_CONFIG_BUFFER).