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

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
maddogg6
Posts: 824
Joined: Dec 07, 2005 22:58
Contact:

Postby maddogg6 » Oct 30, 2011 19:44

darkhog wrote:Yeah, it's loop. Very long, but still loop. Because all loops are looping and this one is looping. Doesn't contain fadeout/in and it loops.

So yes, I call it loop. ;)


I just thought of this...

Break up your BG music in to 3rd's or 8 bar phrases or 32 bar phrases - or what ever - the critical part will timing those 'phrases' - in leiu of 'looping' you just use some small routing to manage that and it could loop infinitely.

32 or 48 bar phrases should load/decode pretty fast (but over all hdd space used will make the ogg compression less relevant)

perhaps load 2 mins of music chunks at a time??

perhaps play around with if timing like that is even possible like that with the FBSound mp3stream() funcs. (??)

I know I hear in games screw up in loops in games I just spent $$$$ on, and I hear it on TV all the time too - how they edit songs to get/repeat to the songs 'hook'....

seems you are concerned the most on this... but it *is* a challenge..lol

perhaps you need to re-invent the new wheel with built in magetic suspension and anti-slip disc brakes.... :)

Maybe you need to make use of a more "streamable" audio format. ??

Or maybe look for a C lib for audio streaming (transmission & reception)

Because I think the problem you are facing is the same basic thing - time to (down)Load before the user gets bored/frustrated and leaves/stalks you. FBSound wasn't really geared toward a strong 'streaming' paradigm.

edit:
while I am not really familiar with ogg, I think MP3 uses a scheme that makes 'samples' relative to its previous 'sample' - which equates to a sort of limit or 'working conditions' when trying to start experiencing media that is large in data bandwidth before the typical human looses interest.
I think there are 'frames' that are like 'resets' in case a 'relative sample' gets lost or error corrected. I think in the case of MP 3, those frames would be of great curiosity for using as 'splice' points to break a song up into smaller 'chunks' that load and begin playback sooner.
badmrbox
Posts: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby badmrbox » Jan 01, 2012 13:22

Test6, test6_b and test6_c dont work for me. They freeze up and shuts down after playing maybe a second or two of the song.
D.J.Peters
Posts: 8203
Joined: May 28, 2005 3:28
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby D.J.Peters » Jan 02, 2012 5:39

badmrbox wrote:Test6, test6_b and test6_c dont work for me. They freeze up and shuts down after playing maybe a second or two of the song.
It's a realtime fractal plus the threads of the sound lib.
A test for 100% CPU usage.

May be it's to havy for your box post your specs
i mean CPU model and MHz/GHz.

You can try a different setup too
22K , stereo, 16 buffers, 4096 samples per buffer
fbs_init(22050,2,16,4096)

and you can try to remove the fullscreen flag
from screenres command.
screenres scr_width,scr_height,,,1

Joshy
badmrbox
Posts: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby badmrbox » Jan 02, 2012 13:38

and you can try to remove the fullscreen flag
This was the problem. Well, that it tried to run in fullscreen in 320x200 was the problem. It ran perfectly in 640x480.
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby Gonzo » Jan 14, 2012 17:03

you might want to #infndef the PI and PI2 defines, since anyone using the lib will have to juggle with defines to make it fit =)

Code: Select all

#ifndef PI
const PI         as single = 3.141592654f
#endif
#ifndef PI2
const PI2        as single = 2.0f * PI
#endif
#ifndef rad2deg
const rad2deg    as single = 180.0/PI
#endif
#ifndef deg2rad
const deg2rad    as single = PI/180.0
#endif


or if you dont trust people, redefine them =)
D.J.Peters
Posts: 8203
Joined: May 28, 2005 3:28
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby D.J.Peters » Jan 15, 2012 12:41

FBSound 0.13 are aviable here.
(tested with FB 0.23 and FB 0.24)

The Linux console bug will be fixed only with the official FB 0.24 release. (not published atm.)

Joshy
D.J.Peters
Posts: 8203
Joined: May 28, 2005 3:28
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby D.J.Peters » Jan 15, 2012 21:09

Sorry there was an error in last *.zip file.

fixed:
libfbscpuwin.a, libfbscpulin.a

is now
\lib\win32\libfbscpu.a
\lib\linux\libfbscpu.a

Joshy
Pinkpuff
Posts: 26
Joined: Jun 10, 2005 18:45

FBSOUND seems to like some wav files and not others

Postby Pinkpuff » Jan 21, 2012 15:00

Hi,

I'm using fbsound to put sound effects into a program I'm working on, and it seems to work correctly for some files but not others. The ones that do not work correctly come out sounding like TV static. Are there some kind of requirements on the kind of wav files that fbsound can handle?

Thanks!
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Re: FBSOUND seems to like some wav files and not others

Postby kiyotewolf » Jan 23, 2012 5:03

Are you creating the WAV files yourself?



~Kiyote!
D.J.Peters
Posts: 8203
Joined: May 28, 2005 3:28
Contact:

Re: FBSOUND seems to like some wav files and not others

Postby D.J.Peters » Jan 25, 2012 4:23

@Pinkpuff
all none compressed 8/16 bit mono/stereo WAV formats are supported and MPI,MPII,MP3, OGG
by the way FBSound is open source you can add your own WAV loader if you like.
(32 bit integer or float, multichannel 4,5,6,8. compressed ...)

Joshy
Last edited by D.J.Peters on Jan 28, 2012 15:10, edited 1 time in total.
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Re: FBSOUND seems to like some wav files and not others

Postby kiyotewolf » Jan 25, 2012 9:12

The *.WAV file header has two sets of data which tells it the length of the number of samples, and another one that's length of the samples plus header, I do believe.

You might check out the headers of your *.WAV files, and manually correct them in FreeBasic, before you send them off to FBSound.

Sounds like that might be your problem.



~Kiyote!

Basically that just means, counting the number of bytes past the header, and inserting the proper values in the header after you count how many.

I've had this happen, sorta, when I was doing my KikiAI speech synth stuff, where, I was actually writing only half the header descriptors for the length of the *.WAV. I forgot about the one closer to the beginning of the header.
Pinkpuff
Posts: 26
Joined: Jun 10, 2005 18:45

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby Pinkpuff » Feb 01, 2012 9:52

Thank you for your replies!

@Kiyote
I did not create the wav files myself, I downloaded them.

@Joshy
That's what I thought, except apparently it doesn't, and I don't have any idea how to create something like that.

@Kiyote
I am a wav file newbie, so I have no idea about things like headers and how the file is encoded and such. How do I examine the header? How do I tell if it is formatted correctly or not? If it did have an incorrect header, why would it still play correctly in other players?
vdecampo
Posts: 2982
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby vdecampo » Mar 30, 2012 16:23

I have used FBSound in the past with no problems, but I was building some classes to encapsulate different game functionality and I am having some issues now with it.

The problem is I am not getting a return value from fbs_Load_WAVFile.

fbs_Load_WAVFile(filename,@hWave) 'returns 0

hWave returns -1

Any ideas?

PS: I am using FBSound .13

-Vince
dafhi
Posts: 1367
Joined: Jun 04, 2005 9:51

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby dafhi » Apr 03, 2012 21:18

Could you make fbs_Get_MasterPointers (@lpStart,@lpPlay,@lpEnd)?
D.J.Peters
Posts: 8203
Joined: May 28, 2005 3:28
Contact:

Re: FBSound for Linux and Windows. (*.wav, *.mp3, *.ogg)

Postby D.J.Peters » Apr 04, 2012 1:57

vdecampo wrote:...The problem is I am not getting a return value from fbs_Load_WAVFile....
if "test02.bas" is ok on your box
looks like your path/filename makes trouble.

I can't tell you what's going wrong without your source code.

Joshy

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 2 guests