hukkax / Propulse

A crossplatform ProTracker clone with an Impulse Tracker-style interface
GNU Lesser General Public License v3.0
59 stars 5 forks source link

building without bass library #1

Closed alexmyczko closed 5 years ago

alexmyczko commented 6 years ago

Hi

It'd be great to have build scripts or a Makefile to build the linux version without bass libraries...

hukkax commented 6 years ago

Next release will support SDL2 for audio with BASS being optional for mp3/vorbis support :) Not sure yet about a makefile though, someone else with more experience might have to work on that.

circular17 commented 3 years ago

On Linux, it seems to require libbass but this library as far as I can see is only available for arm cpu.

I found a {$DEFINE BASS} in propulse.inc, So I disabled this, and now it compiles. But at runtime it crashes on an divss assembler instruction and the call stack points contains the procedure TWindow.FlipFrame. Would that be a bug in SDL2 ?

fredvs commented 3 years ago

Hello.

May I ask you why you did use Bass audio library (because it is not open-source and free only for non-commercial use)?

May I suggest you to try uos? https://github.com/fredvs/uos

(It was highly inspired from Bass library).

Fre;D

hukkax commented 3 years ago

BASS is available for x86 and x64, but I did indeed add a straight SDL2 implementation of the audio routines so BASS is no longer strictly required. Last time I built Propulse on 64-bit Linux it worked fine, I'll look into it soon.

The reason I used BASS is because it's always been my go-to audio library and I'm used to it, and because Propulse started out as a closed-source Windows-only Delphi app. I'll have a look at UOS but I'm happy with using BASS for now.

stuij commented 3 years ago

Hi there,

Sorry to ressurect this issue, but I can't seem to be able to build Propulse without bass support unfortunately.

I tried to comment out {$DEFINE BASS} in propulse.inc, like @circular17 suggested (is that how you disable bass support?), but that leaves me with a compilation error:

(3104) Compiling ./protracker/protracker.messaging.pas
/var/home/zeno/code/Propulse/src/./cwe/widgets/cwe.widgets.text.pas(17,1) Fatal: Internal error 200611031
Fatal: (1018) Compilation aborted

The same error shows when I comment out {$DEFINE SOXR}, so I guess it's not strictly BASS related. Unmodified, Propulse builds fine.

Is this a bug, or am I supposed to do this another way? Is there a way to switch between BASS and SDL2 at runtime perhaps?

The reason I wanted to switch to SDL2 btw is because I can hear a clicking sound when certain samples are played after another, like the previous waveform is cut off from playing abruptly. I don't hear this in schismtracker or in my target application that embeds mod files. Perhaps there is another solution.

Thanks so much!

hukkax commented 3 years ago

Yes, that's the correct way of disabling BASS. You seem to be hitting some compiler bug. I too get Internal Errors on occasion when compiling larger projects. Try building again and if that doesn't help do a Clean up and Build.

However, building with SDL2 for the audio is not likely to fix your issue with the clicking sound; that's just what happens on a real Amiga as well, and Propulse reproduces that. In other players the clicking likely gets smoothed out by interpolation whereas Propulse aims to reproduce a more authentic/accurate Amiga sound. You can try to verify whether you hear the same clicking in 8bitbubsy's Protracker clone.

Building without BASS also disables support for MP3/Ogg Vorbis files, as these are handled by BASS.

stuij commented 3 years ago

Ah thanks. Yes, doing a fresh clone solved the compile issue.

And now the jarring sound breakage/clicking sound is gone. I confirmed from the F4 info pane that Propulse was using the SDL2 audio backend.

It did seem like the sound didn't belong there, as i wasn't doing anything particularly excessive (one empty track, except for the same sample twice in a row with a couple of ticks in between), it was pretty bothersome and it happened on a lot of samples from a curated mod sample pack. I'd think it would be quite cumbersome to work around on an Amiga as well, but who knows. This output sound is now at least more compatible with the sound I get from my particular application (a Game Boy Advance sound engine).

Cheers :) /Ties

stuij commented 3 years ago

Oh, you are right, the clicking is still there with STL2. Didn't check through my headphones.

So historically people just worked around this by for example not putting samples too close together/whatever worked?

hukkax commented 3 years ago

Indeed, or personally I just ignored it :) It's easiest to hear with things like pure sinewaves and various bass sounds.

stuij commented 3 years ago

Ok, thanks for the info :)