fbsound 1.0 Win/Lin 32/64-bit (wav mp3 ogg mod it xm s3m)

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
Imortis
Moderator
Posts: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by Imortis »

That is not an error. That is a warning. You can remove the warning by compiling your program with the -mt compiler switch.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by St_W »

dafhi wrote:I get this error when attempting to run anything
fbc wrote:E:\prod\programming\fb\z store\DJ Peters\fbsound0.20\tests\FBTEMP.bas() warning 20(2): Object files or libraries with mixed multithreading (-mt) options, ../lib/win32\libfbsound.a
The warning message basically tells you what the problem is: you mix FB code compiled with "-mt" and without "-mt". By default code is compiled without "-mt" as long as you don't use any threading commands like "ThreadCreate" etc. - if you do so "-mt" is added automatically.

I haven't looked into fbsound, but maybe you've to compile it with "-mt"; or you have to compile your application with "-mt" when fbsound is already compiled with "-mt".
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by dafhi »

okay I confused with error because many demo files also show:
error: fbs_Init() !
test06.bas

Code: Select all

dim as string data_path = exepath & "/../data/"
'const data_path = "../data/"
new

Code: Select all

if fbs_init(22050) then
new

Code: Select all

  if fbs_Load_MP3File(data_path & "legends.mp3",@hWave) then
Boromir
Posts: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by Boromir »

I'm on windows 10 64 bit and I'm looking for a commercially usable sound library for my game. I compiled this but all the samples crash with "test.exe" stopped working error. I'm compiling on 32 bit fbc.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by D.J.Peters »

again: Sorry I stopped the development of FBSound, it's dead.
Boromir
Posts: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by Boromir »

Are there any free for commercial use alternatives for playing ogg in fb. I've always used fmod but it's not available free for commercial use.
bcohio2001
Posts: 556
Joined: Mar 10, 2007 15:44
Location: Ohio, USA
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by bcohio2001 »

D.J.Peters wrote:again: Sorry I stopped the development of FBSound, it's dead.
If this is "dead". Ask for them to unpin this topic and let it fall from the top.
It will still be searchable, but will no longer at the top of the forum.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by chung »

you can use mcisendstring if you dont need to access the binary data of sounds , just play sounds and music with volume , speed, repeat control. thats what i use in my games.
it is part of windows , so i dont know if it is allowed for commercial use.(it should)
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by D.J.Peters »

@bcohio2001 FBSound is one of the best free and open source soundlib I ever saw
and it's works perfect on 32-bit Windows and Linux.

For example show me any other free open source lib with a realtime pitchshifter ?

The problem are the quality and speed comes from pure x86 inline assembler code.

No once from the FB community is willing to add 64-bit assembler or port it to FB code.

The onsequence are "it will die" :-(

Joshy
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by St_W »

D.J.Peters wrote:No once from the FB community is willing to add 64-bit assembler or port it to FB code.
I'd rather say that the problem is not willingness, but rather the complexity of the existing code. One needs a good knowledge of x86 Assembly including MMX, SSE, ... extensions and probably also a good understanding of audio signal processing to understand what the existing code does and being able to translate it accordingly to FreeBasic code. To make it fast on x64 using x64 Assembly one additionally needs very good knowledge of x64 Assembly programming. I just think that currently nobody in the FB-Forum community fulfils those requirements.
Imortis
Moderator
Posts: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by Imortis »

St_W wrote:
D.J.Peters wrote:No once from the FB community is willing to add 64-bit assembler or port it to FB code.
I'd rather say that the problem is not willingness, but rather the complexity of the existing code. One needs a good knowledge of x86 Assembly including MMX, SSE, ... extensions and probably also a good understanding of audio signal processing to understand what the existing code does and being able to translate it accordingly to FreeBasic code. To make it fast on x64 using x64 Assembly one additionally needs very good knowledge of x64 Assembly programming. I just think that currently nobody in the FB-Forum community fulfils those requirements.
I would love to update it but it is exactly as St_W says. I am lacking knowledge in the areas mentioned above.
Boromir
Posts: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by Boromir »

chung wrote:you can use mcisendstring if you dont need to access the binary data of sounds , just play sounds and music with volume , speed, repeat control. thats what i use in my games.
it is part of windows , so i dont know if it is allowed for commercial use.(it should)
Thanks. I might use that. The downside would be that it would break Linux compatibility.
CPT-GrayWolf
Posts: 3
Joined: Oct 22, 2014 13:28
Location: A Colorado Nothingtown

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by CPT-GrayWolf »

Seems I got no response on my last post.

Anyway, I will be starting my own library.

I intend it to be a feature-rich game oriented audio library written in FreeBASIC for both 32 and 64 bit Window and Linux. I will license it as opensource and free for use and distribution, even in retail applications. I hope to fill in for the lack of such a library currently being available, not just for me, or for FreeBASIC, but for the indie game dev community as a whole.

I plan to use fbsound, not as a base, but as a reference for how such a library would be ideally implemented.

It may be some time before I have a functional library of note, but when I do I'll be posting here first.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by chung »

hi dj !

finally i managed to make fbsound (0.12) work with windows 10 and freebasic 1.05 -win32.
for this i replaced every "byval .... as string" by "byref .... as string" in fbsound.bas,bi but i dont know if it is really necessary

but most of all i added the -dll creation in the build.bat cmd file
@echo "create cpu layer"
@fbc -mt -i inc -lib src/fbscpu.bas -x lib/fbscpuwin
@fbc -mt -i inc -dll src/fbscpu.bas -x lib/fbscpuwin.dll

@echo "create fbsound"
@fbc -mt -i inc -lib src/fbsound.bas -x lib/fbsoundwin
@fbc -mt -i inc -dll src/fbsound.bas -p lib -x lib/fbsoundwin.dll

then added these dlls in the exepath as it asked for it then it works .

tested with fbsound 0.20 without changes , just create the dlls for cpu and sound , works also on windows 10 + freebasic 1.05-win32 (with plug-mm.dll)


note : i had a similar problem with libcurl , link error with the lib version, works with the dll version
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: [it's dead]fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

Post by chung »

The problem are the quality and speed comes from pure x86 inline assembler code.

No once from the FB community is willing to add 64-bit assembler or port it to FB code.

The onsequence are "it will die" :-(

Joshy
i can do it .would you please publish it as open source at sourceforge.net so it will be saved , or do you allow me to do so ?
Post Reply