Author Topic: BASS for Linux  (Read 206089 times)

lagarto

  • Posts: 34
Re: BASS for Linux
« Reply #25 on: 25 Aug '08 - 16:16 »
I do not understand. BassMOD or MP3 and WAV BassLinux Etc..?

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #26 on: 26 Aug '08 - 16:15 »
BASSMOD is basically a stripped-down version of BASS that only supports MOD formats. To avoid any confusion, I have now moved the BASSMOD related posts to a new thread.

If you were looking for the Linux version of BASS, that is still in beta. If you would like to test it, please drop me an email.

lagarto

  • Posts: 34
Re: BASS for Linux
« Reply #27 on: 31 Aug '08 - 11:26 »
And sources examples C or other for LINUX?
Some my idea is create examples for freeBasic.

Thanks
« Last Edit: 31 Aug '08 - 11:29 by lagarto »

saga

  • Posts: 2181
Re: BASS for Linux
« Reply #28 on: 31 Aug '08 - 20:07 »
there are examples for the windows version in examples\libraries\sound. i suppose those will also work for the linux version. ;)

lagarto

  • Posts: 34
Re: BASS for Linux
« Reply #29 on: 1 Sep '08 - 14:50 »
More... compile... only Windows and MacOS...

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #30 on: 1 Sep '08 - 15:34 »
The GUI examples haven't been ported to Linux yet, but the console examples should work as is.

Btw, if anyone familiar with Linux GUI stuff would like to port the examples, that would be handy :D

lagarto

  • Posts: 34
Re: BASS for Linux
« Reply #31 on: 1 Sep '08 - 23:12 »
No GUI... simple compile for console....
Please... example for familiar.

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #32 on: 3 Sep '08 - 15:07 »
The CONTEST.C and WRITEWAV.C console example sources are available from the Win32 and OSX BASS packages.

makrulez

  • Posts: 5
Re: BASS for Linux
« Reply #33 on: 4 Sep '08 - 03:34 »
I'm interested in testing out the beta for linux. I can confirm my e-mail address. Thanks!

Jouvieje

  • Posts: 10
Re: BASS for Linux
« Reply #34 on: 2 Oct '08 - 12:03 »
   
I'm also interested in bass for Linux, and see if I can make it work with java :)
Thanks.

SyGem

  • Posts: 2
Re: BASS for Linux
« Reply #35 on: 16 Oct '08 - 10:41 »
Hi,

I'm just starting on a new project that may end up running on Linux - are the add-ons for BASS going to be ported too?

In particularly I am interested in the BassCD and BassWMA plugins.

Also, do you have an ETA for the release of the Linux version?

Many thanks,

Simon.


Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #36 on: 16 Oct '08 - 15:43 »
I'm just starting on a new project that may end up running on Linux - are the add-ons for BASS going to be ported too?

In particularly I am interested in the BassCD and BassWMA plugins.

The add-ons that are currently available for OSX should also appear for Linux, which unfortunately doesn't include BASSCD or BASSWMA. BASSCD may be a possibility, but I'm not sure about BASSWMA; is the WMA codec freely/legally available for use on Linux?

Also, do you have an ETA for the release of the Linux version?

Pretty much all features have been implemented, and it's mostly just a matter of testing and tweaking things now (and porting the GUI examples). So I would hope for it to be released by the end of the year, but I can't guarantee that.

saga

  • Posts: 2181
Re: BASS for Linux
« Reply #37 on: 16 Oct '08 - 19:26 »
there are wma codecs, but they normally aren't included when installing a fresh system. I don't get the point of using WMA (except maybe streaming from the web) anyway, especially under linux ::)

SyGem

  • Posts: 2
Re: BASS for Linux
« Reply #38 on: 18 Oct '08 - 18:22 »
there are wma codecs, but they normally aren't included when installing a fresh system. I don't get the point of using WMA (except maybe streaming from the web) anyway, especially under linux ::)

WMA is just for completeness really - this will be a project where the user has no knowledge of the OS running, and they may have a collection in WMA format. There may be a GStreamer solution undex Linux, but I don't think I have time to investigate this further.

BASSCD was only required for an optional CD ripping feature, so I could probably live without that or implement a slightly different solution.

I'll probably develop initially for Windows, then look further into moving to Linux later. Thanks for the responses.

lagarto

  • Posts: 34
Re: BASS for Linux
« Reply #39 on: 20 Oct '08 - 22:58 »
  ;) My first test using Mandriva Linux and FreeBasic.

code1.bas
Code: [Select]
'Simple code example using

'FreeBasic = http://www.freebasic.net

'Bass for Linux = http://www.un4seen.com/

#include once "bass.bi"

screenres 512, 418

Dim chan As QWord

Dim argv As String

Dim chanLength As QWord

Dim mpos As QWord

dim kbin As String

argv = "./test.mp3"



If( BASS_GetVersion( ) < MAKELONG(2,2) ) Then

Print "Error: BASS version 2.2 or above required"

'Sleep

End 1

End If



If( BASS_Init( -1, 44100, 0, 0, 0 ) = 0 ) Then

Print "Error: BASS_Init failed"

Sleep

End 0

End If



chan = BASS_StreamCreateFile( FALSE, argv, 0, 0, BASS_SAMPLE_LOOP)



If chan = 0 Then

Print "Error: BASS Stream Load failed"

Sleep

BASS_Free

End 1

End If



chanLength = BASS_ChannelGetLength(chan,BASS_POS_BYTE)



BASS_ChannelPlay( chan, FALSE )



While BASS_ChannelIsActive (chan) = 1   

Locate 1,1

Print "Press button 9 for exit."

    Locate 2, 1

    Print "Length: " & chanLength

    Locate 3, 1

    mpos = BASS_ChannelGetPosition(chan, BASS_POS_BYTE)

    Print "Pos...: "; mpos

   

    kbin = inkey

    Select Case kbin

    case "9"

    goto EndEx

    End Select   

Wend



EndEx:



BASS_ChannelStop( chan )



BASS_StreamFree( chan )

BASS_Stop

BASS_Free

bass.bi
Code: [Select]
#inclib "bass"



#ifdef __FB_WIN32__

# include once "win/wtypes.bi"

#else

'type BYTE as ubyte

type WORD as ushort

type DWORD as uinteger

type BOOL as integer

#define TRUE 1

#define FALSE 0

#define MAKELONG(a,b) cint( cushort(a) or (cuint(cushort(b)) shl 16) )

#endif '' __FB_WIN32__



type QWORD as ulongint

type HMUSIC as DWORD

type HSAMPLE as DWORD

type HCHANNEL as DWORD

type HSTREAM as DWORD

type HRECORD as DWORD

type HSYNC as DWORD

type HDSP as DWORD

type HFX as DWORD

type HPLUGIN as DWORD



#define BASS_SAMPLE_LOOP 4 'looped

#define BASS_POS_BYTE 0 'byte position



#ifdef __FB_WIN32__

declare function BASS_Init alias "BASS_Init" (byval device as integer, byval freq as DWORD, byval flags as DWORD, byval win as HWND, byval dsguid as GUID ptr) as BOOL

#else

declare function BASS_Init alias "BASS_Init" (byval device as integer, byval freq as DWORD, byval flags as DWORD, byval win as any ptr, byval dsguid as any ptr) as BOOL

#EndIf



declare function BASS_Start alias "BASS_Start" () as BOOL

declare function BASS_Stop alias "BASS_Stop" () as BOOL



declare function BASS_SetDevice alias "BASS_SetDevice" (byval device as DWORD) as BOOL

declare function BASS_GetDevice alias "BASS_GetDevice" () as DWORD

declare function BASS_Free alias "BASS_Free" () as BOOL



declare function BASS_GetVersion alias "BASS_GetVersion" () as Dword



declare function BASS_StreamCreateFile alias "BASS_StreamCreateFile" (byval mem as BOOL, byval file as zstring ptr, byval offset as QWORD, byval length as QWORD, byval flags as DWORD) as HSTREAM

declare function BASS_StreamFree alias "BASS_StreamFree" (byval handle as HSTREAM) as BOOL



declare function BASS_ChannelPlay alias "BASS_ChannelPlay" (byval handle as DWORD, byval restart as BOOL) as BOOL

declare function BASS_ChannelStop alias "BASS_ChannelStop" (byval handle as DWORD) as BOOL

declare function BASS_ChannelGetLength alias "BASS_ChannelGetLength" (byval handle as  DWORD,byval mode as DWORD) as QWORD

declare function BASS_ChannelSetPosition alias "BASS_ChannelSetPosition" (byval handle as DWORD,byval pos as QWORD,byval mode as DWORD) as BOOL

declare function BASS_ChannelGetPosition alias "BASS_ChannelGetPosition" (byval handle as DWORD,byval mode as DWORD) as QWORD

declare function BASS_ChannelIsActive alias "BASS_ChannelIsActive" (byval handle as DWORD) as DWORD



'double BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, QWORD pos);

'QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, double pos);

'DWORD BASSDEF(BASS_ChannelGetDevice)(DWORD handle);

'BOOL BASSDEF(BASS_ChannelSetDevice)(DWORD handle, DWORD device);



'BOOL BASSDEF(BASS_ChannelGetInfo)(DWORD handle, BASS_CHANNELINFO *info);

'const char *BASSDEF(BASS_ChannelGetTags)(DWORD handle, DWORD tags);

'DWORD BASSDEF(BASS_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask);

'BOOL BASSDEF(BASS_ChannelUpdate)(DWORD handle, DWORD length);

'BOOL BASSDEF(BASS_ChannelLock)(DWORD handle, BOOL lock);

'BOOL BASSDEF(BASS_ChannelPlay)(DWORD handle, BOOL restart);

'BOOL BASSDEF(BASS_ChannelStop)(DWORD handle);

'BOOL BASSDEF(BASS_ChannelPause)(DWORD handle);

'BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value);

'BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib, float *value);

'BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib, float value, DWORD time);

'BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib);

'BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol);

'BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, float *outvol);

'BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel);

'BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel);

'QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode);

'BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);

'QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode);

'DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);

'DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);

'HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user);

'BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);

'HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, void *user, int priority);

'BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp);

'BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan);

'BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan);

'HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type, int priority);

'BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx);



declare function BASS_MusicLoad alias "BASS_MusicLoad" (byval mem as BOOL, byval file as zstring ptr, byval offset as DWORD, byval length as DWORD, byval flags as DWORD, byval freq as DWORD) as HMUSIC

Next example using Grafic GTK
VU
CPU
POSITION
and more

saga

  • Posts: 2181
Re: BASS for Linux
« Reply #40 on: 6 Dec '08 - 13:55 »
are there any binaries to test yet? I'd like to use BASS in an upcoming win/linux game. :)

lagarto, do the header files that are included with freebasic work with bass for linux? or have you done this port yourself?

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #41 on: 8 Dec '08 - 17:31 »
are there any binaries to test yet?

Yes, there has been for a few months now :)

I am planning to post a public beta here once all of the examples have been ported. Only the CUSTLOOP example is left to do, so that should be fairly soon, but if you like, I can email you the current stuff to try now.

saga

  • Posts: 2181
Re: BASS for Linux
« Reply #42 on: 8 Dec '08 - 18:16 »
i'd like to try it, you may send it to the email in my profile here. :)

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #43 on: 17 Dec '08 - 16:37 »
The Linux beta is now available in the first post!

saga

  • Posts: 2181
Re: BASS for Linux
« Reply #44 on: 17 Dec '08 - 18:11 »
Cool! 8)
I can also say that I didn't have any problems with the pre-release you sent me so far. :)

fredvs

  • Posts: 327
Re: BASS for Linux
« Reply #45 on: 19 Dec '08 - 13:39 »
Hello everybody, im back from africa.
So happy to see that Bass exists for Linux now.
I use Lazarus in Ubuntu and i try to use bass in it.
If i add in USE bass, i get a message from  the compil that bass need Windows instructions.
Wich Pascal code do i need to load bass in Lazarus Linux (Lazarus works also with Windows, it is like Delphi but free.)?
Thanks for your help
. ;)

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS for Linux
« Reply #46 on: 19 Dec '08 - 14:09 »
As it happens, one of the earlier testers did update the Delphi unit (BASS.PAS) for use with Linux. I have now added that to the beta package (in the "pascal" directory).

fredvs

  • Posts: 327
Re: BASS for Linux
« Reply #47 on: 19 Dec '08 - 15:07 »
Hello Ian, thanks for the quick answer.
I have tried the bass.pas with Lazarus in Ubuntu but the compiler say that bass.pas call Windows library....

fredvs

  • Posts: 327
Re: BASS for Linux
« Reply #48 on: 19 Dec '08 - 15:17 »
Ooooops i didnt see BASS.PAS in your new release...(and it seems different of the original one).
I gonna test it this night.
Thanks ;)

diff3

  • Guest
Re: BASS for Linux
« Reply #49 on: 19 Dec '08 - 20:52 »
Hmm.. any plans for linux-amd64 version? ;)