How to return millisecs of song in Imphenzia

Blitz3D Forums/Blitz3D Programming/How to return millisecs of song in Imphenzia

Guy Fawkes(Posted 2009) [#1]
Can someone show me a function to return the amount of millisecs in a song no matter what file type it is?


Guy Fawkes(Posted 2009) [#2]
anyone? =/


Ross C(Posted 2009) [#3]
The only way i can think is to start the song, start a timer, then check to see if the channel is still playing and then stop the timer.


Guy Fawkes(Posted 2009) [#4]
what good would a timer do if it counts up?


Guy Fawkes(Posted 2009) [#5]
would u plz show a small example of how to do this?


John Blackledge(Posted 2009) [#6]
Bass.dll:-

function:
QWORD WINAPI BASS_StreamGetLength(HSTREAM handle);

code:
len=BASS_StreamGetLength(a_stream); // length in bytes
time=BASS_ChannelBytes2Seconds(a_stream,len); // the time length


Guy Fawkes(Posted 2009) [#7]
could u please link me to the dll where u found this function? b/c when i tried to compile w/ bass 1.6.0 it said that BASS_StreamGetLength() didnt exist. Also, when i changed it to BASS_ChannelGetLength() it said userlib function not found..


Guy Fawkes(Posted 2009) [#8]
anyone else? =/


John Blackledge(Posted 2009) [#9]
DSW you are going to have to do more research and study.

Although this community is very helpful, people are not going to write your code for you.

BlitzBassStudio and all of Abrexxes stuff can be found here:
http://www.blitzbasic.com/toolbox/toolbox.php?tool=207


Ross C(Posted 2009) [#10]

Can someone show me a function to return the amount of millisecs in a song no matter what file type it is?




what good would a timer do if it counts up?




You answered your own question there. It's not an elegant solution and i think John's solution is far better. I have zero experience with the BlitzBassStudio though.


Guy Fawkes(Posted 2009) [#11]
does anyone know how to get blitzbass to work right?


Guy Fawkes(Posted 2009) [#12]
o yea. the function, BASS_StreamGetLength() doesnt exist in the dll for some reason. thats why i need the working bass.dll file


_PJ_(Posted 2009) [#13]
With all due respect, as others have mentioned above, you really need to do some legwork yourself.

Considering your issuehere is with a 3rd party application/library, surely it would be better to seek their help, rather than general members of the litz community who may very well have no experience whatsoever with the BlitzBass library (Myself included).

Therefore, I suggest you mention your issue on the BlitzBass thread, http://www.blitzbasic.com/Community/posts.php?topic=69887 as well as checking for notices such as NEW VERSIONS and KNOWN BUGS.
Failing that, why not just email Patrick:
Abrexxes gmail dot com


John Blackledge(Posted 2009) [#14]
DSW, bass.dll works just fine, especially with Abrexxes wrapper.
Remember, I too had an old dll, but once updated and with the latest decls I was away.

The only outstanding issue is 3D sound reacting to camera turn, which Abrexxes is working on.

I may as well say it (we all been trying not to) but it is time for you to knuckle down and stop being so negative and critical.
It's time for you to take the time to study the calls and write your own code, and stop expecting people to write it for you.


Guy Fawkes(Posted 2009) [#15]
i cant believe u would say that. i for the LAST time DONT want people to write it FOR me. I would like a working EXAMPLE to see how to do it. and im sure u already know, but sometimes, even u guys mess up ur examples. thats why i ask for help a 2nd time. i came to this forum for help, and if u guys dont want to, dont bother to speak. no 1 said u HAD to. im not trying to be rude, but i wish u all would quit thinking im trying to get u to do it for me.


Guy Fawkes(Posted 2009) [#16]
now im sorry if i keep asking for help, but do u wanna know the real reason i learn the way i do? its b/c i have A.D.D. go ahead & laugh, or make fun of me, but its true, and im not afraid to say it. there, now u know.


GIB3D(Posted 2009) [#17]
Laugh, about... A.D.D.????? What's there to laugh about. Who cares that people gave the hyperactivity a name. It shouldn't stop you from trying different ways to solve your problem before coming to the forums.

What I do is stop doing one project, start another, and usually I end up learning what I needed to know for the other project. Like, with my Gorilla game, I had a sucky 2D Map Editor. Then I kind of gave up for awhile and made other games (never finished them) and in one of my newer games, I made my first 3D Map Editor. I used all of the knowledge I've learned from all those other games, and used them in my Gorilla game.

Basically, don't try to be too direct in learning, try new things, go off the long boring road and see the.. umm... pointy cactus? Sometimes you learn more by not trying to learn.


Guy Fawkes(Posted 2009) [#18]
thanks gia. im glad at least someone sees it the way i do. :)


Guy Fawkes(Posted 2009) [#19]
thanks gia. im glad at least someone sees it the way i do. :)


Guy Fawkes(Posted 2009) [#20]
sorry for the double post. my broswer is messed up..


John Blackledge(Posted 2009) [#21]
I'm asking you to stop being critical of other people - that simple.
This is not about a syndrome, it's about polteness and respect.


Ross C(Posted 2009) [#22]
Yeah, the gorilla game! :D


Jasu(Posted 2009) [#23]
Coders virtues:

Intellect
Self-confidence
Patience http://www.blitzbasic.com/Community/posts.php?topic=74580

You can develop all of them.


Guy Fawkes(Posted 2009) [#24]
is there a way u can multiply the file size by millisecs & divide by 60000 to return the millisecs?


SLotman(Posted 2009) [#25]
nope - file size may vary due to compression used / sample rate / bit rate and many other parameters. There's no way to get the song length using the file size.


Guy Fawkes(Posted 2009) [#26]
CRAP. Is there another way? PLEASE. There HAS to be.


GIB3D(Posted 2009) [#27]
I'm sure there is a way (has no answers), because Windows Media Player can do it ;)


Ginger Tea(Posted 2009) [#28]
is there a way u can multiply the file size by millisecs & divide by 60000 to return the millisecs?

as said up there nope, too many variables

wav files are easier to sus with headers, you just need to know the right bits and bytes to have a gander at
but by default a cd quality stereo wav clocks in at 10mb per minute

http://www.mp3-tech.org/
i boiled a kettle on mp3 headers and aside from wiki this was 2nd or 3rd in the list

this long technical document could give you either pointers into the underlying data you need, or a great big headache

on a side note, most if not all examples need better documentation and the lack of blitz books (ok we have some but not on the same par as other lingos) especially geared to understanding nuts and bolts not just "it took me half a book to make a simple game and i didnt really show you how each block worked and how to re use it"

and it is true that sometimes posting an example of code for you to learn from would be pointless as there may be only 2 ways of coding what you need, so you wouldnt learn anything aside from "copy and paste"
psyudo code would be better in your caase
give you something that wouldnt work in blitz (or any lingo for that matter) and a list of commands used
kinda like how spoken language books do it
james ____ mary a ____, she ____ him and said "____"

book
gave
thanked
cheers

ok a bit patronising but coding from cookie cutter code bites might be detrimental in the long run as the more complex things get the more YOU need to know what each bit of code is doing and not rely on any inline documentation posted by a 3rd party


_PJ_(Posted 2009) [#29]
What's ADD?


Guy Fawkes(Posted 2009) [#30]
Attention Deficit Disorder: It means I learn twice as slow as everyone else, but am also a genius. and it means i have a short temper. say as u wish all, but thats what it means, Malice.


John Blackledge(Posted 2009) [#31]
Hey - in that case, so have I !!!
That means I don't have 'attitude', I have a syndrome.
I'll tell them at work today.


Guy Fawkes(Posted 2009) [#32]
U BETTER have not made fun of me. I get SO sick of people who do that..


_PJ_(Posted 2009) [#33]
Thanks. I only heard of ADHD, I guess you donyt get the hyperactivity part?

I dont think JB was making fun of you, I think he was ore making light of his own situatin with work.

Anyway, back to the topic.. any luck yet?


Guy Fawkes(Posted 2009) [#34]
nope. is there a way u can download the media player source and find it that way?

and no, i dont get hyper.


_PJ_(Posted 2009) [#35]
The simple answer would be:

File Size / bitrate

However, bitrate is probably gonna give you some problems, as VBR compression techniques are more popular than CBR now, though of course, the average bitrate in the above equation should always give the duration.

How to obtain the average bitrate is gonna involve reading the fileheader and somehow knowing where to look and what for. I'm also gonna take a guess that the prrecise location of the bitrate info in the header or in an mp3 tag or whatever is gonna be in a different place for each filetype :S


Guy Fawkes(Posted 2009) [#36]
is there a command to get the current bitrate compressed or not?


Ginger Tea(Posted 2009) [#37]
did you read that headache inducing link i posted?
it has alot of info bout the m3 header file inc which bit rate is used (a byte flag) and if vbr its tagged in blocks or something


_PJ_(Posted 2009) [#38]
Not in Imphenzia.

I (and others) have given you the method and suggested contacting people like Abrexxes. I don't have Bass.dll, nor do I know why the GetStremLength function isn't working in it for you. There is always a limit to others' abilities and this is mine. So please, take the advice that's been given and use it, search the web, send a mail, whatever! :)


Ginger Tea(Posted 2009) [#39]
well i re read my post i just posted the main site
but the link programmers corner i thought would be the obvious link to click

but the page in general is this
http://www.mp3-tech.org/programmer/frame_header.html


Guy Fawkes(Posted 2009) [#40]
ginger tea. none of this makes sense.


Ginger Tea(Posted 2009) [#41]
i did say it was headache inducing
but it 'might' answer some of your questions

also it might be over kill seeing as all you want is to understand how long a song is
it tells you the bit rate, if it is CBR or VBR and the above math you asked wouldnt work without knowing the bit rate, but IF you knew the bit rate reading the right byte you could say
this file (song) is x bytes long
the bit rate is 128 CBR
do funky maths here
song lenght is

but if windows can tell you the lenght (and alot more) with a mouse hover then that information mustnt be that well hidden from windows


Ross C(Posted 2009) [#42]
I would imagine that information would be stored in the header of the file.


Ginger Tea(Posted 2009) [#43]
which can be read via blitz if you know what you are looking for
and thats what that link shows, when im not going cross eyed looking at it


Ross C(Posted 2009) [#44]
I know, i was just trying to point him in the same right direction your pointing.


_PJ_(Posted 2009) [#45]
I found this function from a VBScript forum. It is specifically for WAV files, but certainly, the idea is there.

Code:
Private Sub Command1_Click()
    Dim MyInt As Integer
    Dim MyByte As Byte
    Dim MyStr As String * 4
    Dim MyLong As Long
    Dim SampleRate, BytesPerSample, FileSize As Long
    
    Open "d:\tmp.wav" For Binary Access Read Lock Read As #1
        Get #1, , MyStr:    Debug.Print "Riff = "; MyStr
        Get #1, , MyLong:   Debug.Print "File size = "; MyLong
        FileSize = MyLong
        Get #1, , MyStr:    Debug.Print "Wave = "; MyStr
        Get #1, , MyStr:    Debug.Print "Format = "; MyStr
        Get #1, , MyLong:   Debug.Print "Any = "; MyLong
        Get #1, , MyInt:    Debug.Print "formatTag = "; MyInt
        Get #1, , MyInt:    Debug.Print "Channels = "; MyInt
        Get #1, , MyLong:   Debug.Print "Samples per Sec = "; MyLong
        SampleRate = MyLong
        Get #1, , MyInt:    Debug.Print "Bytes per Sec = "; MyInt
        Get #1, , MyInt:    Debug.Print "BlockAlign = "; MyInt
        Get #1, , MyInt:    Debug.Print "Bytes per Sample = "; MyInt
        BytesPerSample = MyInt
    Close #1
    Debug.Print "Wave File Duration = "; _
        FileSize / (SampleRate * BytesPerSample); " seconds"
End Sub


I ran into some difficulty because of my lack of knowledge with readigng streams and stuff, though in trying to convert to BB
   
Const filepath$="C:\WINDOWS\Media\Windows XP Startup.wav"
Const CHANNELS=2

file=OpenFile(filepath$)
fsize=FileSize(filepath$)
For offset=0 To 28
	LeastOne=ReadByte(file)
Next

LeastOne=ReadByte(file)
SigOne=ReadByte(file)
LeastTwo=ReadByte(file)
SigTwo=ReadByte(file)
CloseFile file
ByteOne=(SigOne*256)+LeastOne
ByteTwo=(SigTwo*256)+LeastTwo

Bitrate#=(ByteOne*ByteTwo)/1000
Bitrate=Bitrate*CHANNELS

duration#=fsize/(bitrate#)
duration#=duration#/CHANNELS
durationseconds=duration Mod 60
durationminutes%=Int(Floor(duration#/60))

Print "Bitrate: "+Int(Bitrate)
Print "Duration: "+Right$("000"+durationminutes,3)+":"+Right$("0"+durationseconds,2)



Ginger Tea(Posted 2009) [#46]
Ross, thought it was more at him than me, but i thought id better rephrase myself ... sometimes l337 coders need a bablefish patch to understand my posts ;)

maice's code althogh for wavs (and vBasic) is a step in the right direction

dark shadow wing
you have a header file document listing bit rates and other mumbo jumbo
you have a vb script for wav headers that can be converted into blitz and modified to read mp3 headers

a little bit of effort and you should get the info you need
all it is is reading something like the 5th byte in the mp3 file and seeing what the bit rate is then applying that funky maths (if its correct) or finding the song length info in the header if its there too


Ginger Tea(Posted 2009) [#47]
never be afraid of hex editors
these are invaluable when mucking around with data files trying to reverse engineer them in one way or an other
accidentally changing the bit rate and hitting save might produce an unplayable mp3, then again it might just sound p**s funny

i had a really naff hex editor that wouldnt copy/paste and i was trying to get the +4/c64 level details of a game and also have a version separated from the game file just for convienience

i eventually found a continuouse amount of 7's or whatever that i knew to be the top wall and thankfully level 1, after adding in some random values i found out which ones were which game tile

bit of hard work and eye strain even at low res and i have all levels ready and waiting for me if i choose to actually re-learn to program on my days off or not

it also inspired me to 'perhaps' work on a hex editor myself, but why reinvent the wheel (aside from the one i was using was 'naff')

so hard work or not, read that link, it has the info you want, if you want it work for it


Ross C(Posted 2009) [#48]
/me runs the babelfish...

AH! :o)


Guy Fawkes(Posted 2009) [#49]
The thing i dont get, is how does windows media player do it?

heres the code so far:



~DarkShadowWing~


Ginger Tea(Posted 2009) [#50]
The thing i dont get, is how does windows media player do it?


cos they know which byte to look for and the funky maths needed to do the funky maths

plus im sure microsoft have paid for the privalage of seeing more info abuot mp3's than us mere mortals do, im guessing part of the above link was brute force hex editing trial and error coupled with whatever information was made freely available from the patent holders


Guy Fawkes(Posted 2009) [#51]
How do u extract the whole header of a song file? Can you please show me a working example using mp3?


Ross C(Posted 2009) [#52]
Maybe this link would help?

http://www.codeproject.com/KB/audio-video/mp3fileinfo.aspx


Ross C(Posted 2009) [#53]
In fact, scrub that, this looks more promising:

http://www.mp3-tech.org/programmer/frame_header.html


Guy Fawkes(Posted 2009) [#54]
maybe to u. but this looks very X_X to me.


Ross C(Posted 2009) [#55]
From my limited research(i don't know much about bits and filtering them, but i have learned within the last hour), the header of the file all depends on whether you save extra information, in the form of track name, album name.

I have saved an mp3 with the header information, as various bit rates and the first 32 bits of this file seem to be identical. However, when i saved the exact same file without the extra information, the first 32 bits are completely different but remain the same regardless of the bitrate you use, so i'm lost so far. It must be telling you if additional track information is saved.

I found something on wiki though, that might help you:

http://en.wikipedia.org/wiki/MP3#File_structure


Guy Fawkes(Posted 2009) [#56]
Check this out, Ross.

http://www.xtremevbtalk.com/showthread.php?t=230979


Ross C(Posted 2009) [#57]
It seems you may need a way to extract an ID3 tag as well. Maybe this project just isn't for you man? As this looks pretty complicated to do. I'm reading the wiki artcile and extracting the bitrate as it says, but it doesn't match up with the information given in the bitrate diagram.


Ross C(Posted 2009) [#58]
That information is based on a .wav file. NOt an .mp3 or .ogg etc etc


Ginger Tea(Posted 2009) [#59]
In fact, scrub that, this looks more promising:

http://www.mp3-tech.org/programmer/frame_header.html


thats why i posted it ages ago ;)
my 'headache inducing link'

From my limited research(i don't know much about bits and filtering them, but i have learned within the last hour), the header of the file all depends on whether you save extra information, in the form of track name, album name.


ive learnt more bout the ins and outs of mp3's by boiling a kettle reading the link and posting here
and im not the one needing the bloody info ;)

read up on the ins and outs of mp3 files as you can, reading up on these things opens up better questions as well as answering them
read many of the same types of articles, some have the same info but others are written better so that even your nan would understand (if she worked in bletchly park during the war that is)

heres a test
get a CD, take a song, any song, rip it at 320 kbps, 192kbps etc all the CBR rates that windows media/whatever can handle (save each as song-file-that-windows-made-bitrate.mp3
with or without ID tages at this stage it dont matter

get a hex editor and look at the header of each in turn
if its a bit or two defining one of the first dozzen or so bytes then it would be semi easy to find
eg
ABBCD335
ABBCD345

but this is only for mp3 headers (and tags)
wav, ogg and others all have their own way of doing things
just as bmp jpg gif and png would
but each seems to start with a header tht the program understands by reading a section of gyberish paint knows what size the canvas is and the bit depth (and for gif / 256 colour images the CLUT)
its machine readable so gobbledy gook to us but if you know the keys its easy to crack with your own loader
(just be thankfull we dont have to do this every time when loading a png in blitz, blitz has done it for us)


_PJ_(Posted 2009) [#60]
I think we can all agree...

it's not gonna be easy.

Wouldn't it be lovely if all file extensions, compressed or otherwise had a sttandardised format for the headers?


Ginger Tea(Posted 2009) [#61]
if they were all invented around the same time ;)

how long had wav been going before they started working on mpeg and in turn, mp3's)
nearly a decade?


Ross C(Posted 2009) [#62]
Yeah, even within the .mp3 head structure, there can be massive differences. I don't really have the time to dedicate to extracting this information as i have some other projects that i'm working on. As Mr Tea says, grab a hex editor and start trying to find where abouts the bitrate is stored, based on which bitrate you saved out.

The problem is, the bit rate is stored using 4 bits and you must look up a diagram to determine what bit pattern relates to what bit rate.

Sorry for the duplicate link Ginger. You'll need to find a way though of reading the ID3 tag if one is present.


Ginger Tea(Posted 2009) [#63]
As Mr Tea says "grab a hex editor"

"i pitty the fool who dont grab a hex editor"
lol

Sorry for the duplicate link Ginger.

np
2 different people prodding him at the same link is better than no one i guess


Ross C(Posted 2009) [#64]
You know i posted that and the A-Team is on telly. I didn't even realise... Hehe, "I ain't gettin on no plane, fool!"


_PJ_(Posted 2009) [#65]
*gives Ginger a Milkshake* Hahaha!


Guy Fawkes(Posted 2009) [#66]
what do u make of this? is there a way to transfer this to a formula?

http://www.autohotkey.com/forum/topic29420.html


Guy Fawkes(Posted 2009) [#67]
i just found some interesting data.

http://www.codeproject.com/KB/shell/shellid3tagreader.aspx?display=PrintAll&fid=23393&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=26


Ginger Tea(Posted 2009) [#68]
as long as there is alot of JD in it this mr Tea will drink nigh on anything :D

well the first link is kinda like the one me and ross posted, perhaps with more text in it

MP3 file is divided into a small blocks - frames. Each frame has constant time length 0.026 sec.
But size of one frame (in Bytes) varies according to bitrate. Eg. for 128kbps it is (normally) 417 Bytes and for 192kbps 626 Bytes.


eg i dont recall each 'frame' having a header, i thoght it only had one, then again i got a headache reading the link and just posted it ;)
although i kinda sussed it did that for vbr though

and 0.026 seconds ?!? why not one whole second or a propper fraction like .5 .25 only f1 race cars need to worry bout 0.026 seconds

i also (before plodding off into town) ripped a song at the 4 CBR on offer from windows media and had a gander at them with a hex editor, i couldnt find anything different with the first god knows what (mind you i didnt have em both up side by side)
but i noticed they had lines and lines of
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

followed by a huge pile of
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF


then the real gibberish began
id paste what was on the afaik identical bits if it wernt for the fact my free hex editor wont let me :(


Ross C(Posted 2009) [#69]
Yeah, according to the stuff i read, each section has a frame header, but it's only the first one your after, in an mp3's case. I didn't get all that gibberish when i used blitz to read the first 4 bytes... odd.


_PJ_(Posted 2009) [#70]
I'm totally left behind by this thread now, but I did just notice this:

http://www.blitzbasic.com/codearcs/codearcs.php?code=2220

Which, for .OGG and .WAV should help with BB header byte format.


Ross C(Posted 2009) [#71]
I think this is a lost cause anyway, because someone will have to write the full code out. I personally don't have time to do that and can only point in the right direction.


Ginger Tea(Posted 2009) [#72]
im back to working in the fridge full time again, 8 and not 12 hours as it used to be
my iq is frozen at idiot levels again till i get drunk ;)

i guess leaving this bit out for the time being and working on other bits of the media player
the layout of mp3's arnt going to change over night so all those links will still be valid a week, month and year from now

me im going back into paint.net and cobble up some s**ty santa sprites


Guy Fawkes(Posted 2009) [#73]
what could u make of this?




Ginger Tea(Posted 2009) [#74]
would help if it was an mp3 that anyone would have on their system
or a legal mp3 download that could be used instead

i know i could change the path to one of my own im just being picky ;)

the question to ask (im not able to test code out at the moment) is what happened for you?
did it report the same length as other mp3 players and windows itself?
etc


Guy Fawkes(Posted 2009) [#75]
no idea. dont have darkgdk lol


Ginger Tea(Posted 2009) [#76]
erm how about changing the path to an mp3 that you DO have then ;)


Guy Fawkes(Posted 2009) [#77]
lets start using this line.

what would this be in blitz?



~DarkShadowWing~


Ginger Tea(Posted 2009) [#78]
oh so its not blitz code youve posted but something else and due to darkgdk im assuming db or dbpro
i just thought the dark gdk reference was due to the path of the mp3 it uses in the example

sorry but with my brain today im barely able to do english let alone blitz/psyudo code (and english is my native language o.O)


Guy Fawkes(Posted 2009) [#79]
Lol. its cool :P So what would this line be in blitz?


Guy Fawkes(Posted 2009) [#80]
could u guys help me figure out this code if i showed u this?




Adam Novagen(Posted 2009) [#81]
Hate to be a party pooper, DSW, but unless I'm greatly mistaken this code will give you no information about the LENGTH of an audio file. Only the channels, sample rate, etc. Also, I don't believe there IS a simple formula for calculating all audio file durations. I say this because some MP3s use "variable bitrates," which means that they might be playing at 32kbps for a few seconds, then switch to 80kpbs.

Basically, because the bitrate doesn't stay the same all the way through the song, you can't use the bitrate in a formula. You'd need to literally unpack & examine the entire MP3 file in your program to find out how long it actually is.

Besides, there are so many different audio formats that are so VERY different from one another, it's highly unlikely that you could use the same method for all of them. I only have two suggestions:

1: If you only need the lengths of specific songs, such as background music for a game, either use a sound editor like WavePad to find the exact length, or make your own timer like this:

SongChn = PlayMusic("YOUR FILENAME HERE")
SongStart = MilliSecs()

Repeat
Until Not ChannelPlaying(SongChn)

SongDuration = MilliSecs() - SongStart
Print SongDuration
WaitKey


2: If you need to find the length of ANY audio file, like you would if you were making your own media player or something, you should try and figure out how to get BlitzBASS working.

3rd alternative: I'm not being sarcastic here: if you really want to know how Windows Media Player does it, you could always ask Microsoft! There's not much chance they'll tell you, but if you send your best-written, well thought out request they might just help you out. Seriously, how bad do you want to figure this out?


Mahan(Posted 2009) [#82]
Found this page with a C++ source that can return the length in seconds of an MP3 with constant bitrate (i.e. variable bitrate won't work):

http://stackoverflow.com/questions/119404/time-length-of-an-mp3-file

137 lines of C++ (a language quite capable with streams).

I'd recommend using some lib or something, especially if this is your first Blitz3D project. This is not trivial, and can take some time to get right.


Guy Fawkes(Posted 2009) [#83]
if everyone would just understand that its hard for me to learn all this, then really bad. if not, then i dont even care anymore.


Ross C(Posted 2009) [#84]
It's hard for other people to come along and learn stuff, just to help someone too.

If it's beyond your capabilities and you can't possibly learn it, then do something different. You said this was for an application, that was "hitting the shelves" and had a deadline.

If that's the case, your in WAY over your head here. Your not able to do this without someone else basically doing it for you. I don't know who gave you a deadline, or hired you, but i suggest you only do projects or work to deadlines, if you have the knowledge/capabilities to complete the task at the start.

Everyone has things they find hard learning. Don't be so hard on yourself. Me personally, i wouldn't take on a project in blitz, that has a deadline, knowing i couldn't complete it without relying on other people (that aren't in turn hired by me) to help. Or join a band, and only know the basics of playing an instrument. I imagine most people are in the same boat.

As said previously, the BlitzBASS lib would be my option if i were doing this, because i don't think i would be able to easily do this otherwise. Take advantage of libs. No point in coding yourown (unless it's for learning purposes) if one already exists and works fine.

Good luck.


John Blackledge(Posted 2009) [#85]
Adding to Ross C, somebody once said to me "I'm sure I could play guitar like you - if I only knew where to put my fingers."


Ginger Tea(Posted 2009) [#86]
for a tassk like this the whole
"i need to see an example code to learn from it"

thing just wont work
as we might as well say heres the code, you dont need to learn from it cos its complete, just cut and paste into your code

given time and effort those links i ross and everyione else posted would yeild results (except from vbr mp3's perhaps)

the only way it could be written out for you to learn from was if it was psudocode, but again one of us would have had to do all the leg work in the first place and would probably just stick it in the code archives

eg:
reading the mp3 header link we found that the bitrate was stored in say the 10th byte and there was a funky maths algorythm to make size in bytes = song lenght wed have to do something like this
open the mp3
read the 10th byte
look it up in the select case bitrate list
apply funky maths
print song length in seconds
print song lenght in minutes and secons

then check the results with another program or windows explorer to see if it comes up with the same number of minutes and secons

i went cross eyed with that mp3 tech link i (and ross) posted but most if not all answeres were contained there and without paying faranhoff or however you spell the patent holders name for further information (no doubt in C) that might be the heights of free information in the ins and outs of mp3 files

but if i was given a link and told "the answeres you seek lie within" id read it and try and get my head around it
and we posted alot of the meat over a week ago
if you are still going crosseyed at it now then perhaps this part of the project isnt for you to code but to get a pre written custom job ordered


Ginger Tea(Posted 2009) [#87]

Within an MPEG audio file, there is no main header, as an MPEG audio file is just built up from a succession of smaller parts called frames.Each frame is a datablock with its own header and audio information.

In the case of Layer I or Layer II, frames are totally independent from each other, so you can cut any part of an MPEG audio file and play it correctly. The player will then play the music starting from the first full valid frame it will find. However, in the case of Layer III, frames are not always independant. Due to the possible use of the "byte reservoir", wich is a kind of internal buffer, frames are often dependent of each other. In the worst case, 9 input frames may be needed before beeing able to decode one single frame.

If you need to retrieve information about an MPEG audio file, you might simply locate the first frame, and retrieve information from its header. Information within other frames should be consistent with the first one, except for the bitrate, as you might be retrieving information from a variable bitrate (VBR) file. In a VBR file, the bitrate can be changed in each frame. It can be used, as an exemple, to keep a constant sound quality during the whole file, by using more bits when the music is more complex and thus requires more bits to be encoded with a similar quality.

The frame header itself is 32 bits (4 bytes) length. The first twelve bits (or first eleven bits in the case of the MPEG 2.5 extension) of a frame header are always set to 1 and are called "frame sync". Frames may also feature an optional CRC checksum. It is 16 bits long and, if it exists, immediately follows the frame header. After the CRC comes the audio data. By re-calculating the CRC and comparing its value to the sored one, you can check if the frame has been altered during transmission of the bitstream.

Here are the details of what is within a frame header:

AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM


taken from http://www.mp3-tech.org/programmer/frame_header.html

AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM
represents certain aspects of the frame header, each is a single bit
EEEE deontes the bitrate used for this frame


Ginger Tea(Posted 2009) [#88]
i forgot that hex editors only view hex and ascii and i was looking for a minimum of 11 consecutive bits to start the header
but i found this number re occuring FFFBE040

here is a break down
FFFBE040
F    F    F    B    E    0    4    0
1111 1111 1111 1011 1110 0000 0100 0000
AAAA AAAA AAAB BCCD EEEE FFGH IIJJ KLMM

A 11111111111
B 11   - MPEG Version 1 (ISO/IEC 11172-3) 
C 01   - Layer III
D 1    - Not protected
E 1110 - 320kbps 
F 00   - 44100 Hz
G 0    - frame is not padded
H 0    - Private bit. This one is only informative
I 01   - Joint stereo (Stereo)
J 00   - Mode extension (Only used in Joint stereo) 
K 0    - Audio is not copyrighted
L 0    - Copy of original media
M 00   - Emphasis none


the file is a CBR 320kbps mp3 ripped from a CD to test this out last week
the number occours every so many bytes to indicate the next fram, however this was only when padded by nothing but FF, once the real music started and garbled data appeared the header changed per frame, perhaps windows media started using VBR without telling me?

but here is one of those frames


this has proably little use in general i just thought id post it as id done it anyway
although a find/replace of the header changing section E to another bitrate might be fun (if it works)


_PJ_(Posted 2009) [#89]
oh mah gawwwd this thread has grown.. I just saw this, might help...


http://www.blitzbasic.com/codearcs/codearcs.php?code=1775


Guy Fawkes(Posted 2009) [#90]
THANKS MALICE! U ROCK! :D THIS DOES HELP!

Can someone help me mod it to work for any music file? Or at least for: .asf, .wma, .ogg, .rmi, .it, .raw, .s3m, .mid, .wav, .xm, .mod & .mp2?



~DarkShadowWing~


Ross C(Posted 2009) [#91]
You can't mod that code that easily, as each file format has it's own unique header setup and such. It's a mammoth task i reckon. Nice piece of code though.


Guy Fawkes(Posted 2009) [#92]
i hate file headers.... ><


Guy Fawkes(Posted 2009) [#93]
how the heck did they do it with mp3 then eh?


Mahan(Posted 2009) [#94]

how the heck did they do it with mp3 then eh?



They read the spec:s and wrote the code accordingly?


Or at least for: .asf, .wma, .ogg, .rmi, .it, .raw, .s3m, .mid, .wav, .xm, .mod & .mp2?



*lol* at least? You know each and every of those formats will end up with about the same amount of code as the MP3 example (+-50%) so just as Ross said the amount of work huge!

And btw. wma is a DRM enabled format. Maybe it's possible to read out the file length (in millis) without fully decoding the stream, but what I mean is you'll probably hit more problems along the way.


Guy Fawkes(Posted 2009) [#95]
*sigh* i know. i proally wont even finish it.... i thought it would be a nice project, but geez.


Ross C(Posted 2009) [#96]
Use the blitzbass?


Guy Fawkes(Posted 2009) [#97]
yea. i was gonna try it, and when i did, i couldnt compile it, cuz it couldnt find a dll function. can u plz link me to a guide that is step-by-step and / or a fix for the bass.dll....?

thanks :)


LineOf7s(Posted 2009) [#98]
Everything you need is at THIS entry in the toolbox, specifically at THIS link.

Be aware, you might have to do a minimal amount of thinking.


Guy Fawkes(Posted 2009) [#99]
ok, so whats up w/ the dll? is there a dll i replace it w/? cuz when i compile the project, it says function not found.


Mahan(Posted 2009) [#100]
Just another though: Are you absolutely sure you must have all these features? I've been programming for 18 years of my life still I often realize I over-complicate things. I start with a project but that I dwelve down so deep into details that I forget what the whole project was about.

Like a practical question to reevaluate: Do you really need support for ".asf, .wma, .ogg, .rmi, .it, .raw, .s3m, .mid, .wav, .xm, .mod & .mp2"? You'll get a long way today with MP3 and most twelve-year-olds today have a "nerd" in their class that can help them convert a few files from one of these formats to an MP3, for a bottle of Coke. =)

Just asking ...


Guy Fawkes(Posted 2009) [#101]
Yes, b/c I want it to be professional. besides, MP3 license costs $2500, which i dont have. so i might take mp3 out..


Gabriel(Posted 2009) [#102]
If you want it to be professional, hire a professional.


LineOf7s(Posted 2009) [#103]
ok, so whats up w/ the dll? is there a dll i replace it w/? cuz when i compile the project, it says function not found.

Did you place the .decls file in your Blitz userlibs directory, then restart your IDE to register the new keywords?

Everything in the download link I gave you works out of the box.


Abrexxes(Posted 2009) [#104]
Hi,

for everything what DarkShadowWing is asking, there is no problem with BBS if you are able to use "userlibs". BBS use no other way to include a userlib like all the others.

If you want to get ALL your stuff (decoded) in ram before using it for calculations (and other manipulations) use the BASS_STREAM_DECODE (or BASS_MUSIC_PRESCAN) flag (stream/(music)) while loading.

For simle calls you have BASS_ChannelGetLength and BASS_ChannelSetPosition.

DarkShadowWing, please read the docs. The docs of blitzbasic, Imphenzia, BBS,...all of them.

Can someone help me mod it to work for any music file? Or at least for: .asf, .wma, .ogg, .rmi, .it, .raw, .s3m, .mid, .wav, .xm, .mod & .mp2?


All of them have no ID Tags!

read here about mod formats and google about audio file formats ftp://ftp.modland.com/pub/documents/format_documentation/

mod you can do with...you will find it out. ;)

bye


Guy Fawkes(Posted 2009) [#105]
abrexxes, try to use BASS_ChannelPlay, it WONT work. I tried..


Guy Fawkes(Posted 2009) [#106]
whats w/ this? function dp_init() not found for dreamplayer 2.5.


Ginger Tea(Posted 2009) [#107]
read here about mod formats ...

i think he meant modify the code, not mod music

as for the docs of all the above (bar b3d) id have to buy it to read it so could only point to what i could point to ;)


Guy Fawkes(Posted 2009) [#108]
yea gingertea, i meant the code :) i even looked in the dll, and the function playchannel or whatnot didnt even exist. also, dp_init() is not found, therefore, i believe dreamplayer is missing a file or 2. a bb file.


Mahan(Posted 2009) [#109]
i even looked in the dll, and the function playchannel or whatnot didnt even exist.


Just of curiosity, what tool did you use to check the functions inside the DLL? QuickView, Dependency Walker etc? Was a while since I used such a tool, and I was wondering what tools are preferred for this kind of job these days. (I'd love to see something Open Source in this department)


Guy Fawkes(Posted 2009) [#110]
dll export viewer :) http://www.nirsoft.net/utils/dllexp-x64.zip (vista) http://www.nirsoft.net/utils/dllexp.zip - xp :)

can anyone answer the question above mahan? :) i really wanna try dreamplayer and bass :)


Abrexxes(Posted 2009) [#111]
abrexxes, try to use BASS_ChannelPlay, it WONT work. I tried..


quote from bass.chm
BASS_STREAM_DECODE Decode the sample data, without playing it.


So, decode your stream, store the infos in a bank, and sinc. it with a new stream with getposition..where is the problem?

Else store the decoded stream in ram and play it from there..where is the problem?

I am sorry, but bass is not an "audiomaker" but an engine.

bye


Guy Fawkes(Posted 2009) [#112]
ok, the prob w/ dream maker is:

whats w/ this? function dp_init() not found for dreamplayer 2.5.


and for bass, the prob is:

function BASS_ChannelPlay() not found.



Abrexxes(Posted 2009) [#113]
About Channelplay,..no Idea, check your version with this

Include "includes\bass.bb"

Timer=CREATETIMER (60)
Graphics 640,480,0,2
SetBuffer BackBuffer()

BASS_Init(-1,44100,0,0,BASS_NULL)
While Not KeyHit (1)
Cls
version = BASS_GetVersion()
Text 0,20,"Bass version : " +HEX$(version)
WaitTimer Timer 
Flip 0
Wend
BASS_Free()
End



About the dreamplayer, there are at the moment some dll missing from ChristianK, this will be solwed in the next release. I have only the permission from hectic to include HIS code, not other stuff that he use. I must have(i want) a permission from CristianK before i do that.

bye


Guy Fawkes(Posted 2009) [#114]
bass ver. 00000001


Abrexxes(Posted 2009) [#115]
so, your configuration is simply not right, bass is not loaded.

the present version = 02030003

bye


_PJ_(Posted 2009) [#116]
With all due respect, as others have mentioned above, you really need to do some legwork yourself.

Considering your issuehere is with a 3rd party application/library, surely it would be better to seek their help, rather than general members of the litz community who may very well have no experience whatsoever with the BlitzBass library (Myself included).

Therefore, I suggest you mention your issue on the BlitzBass thread, http://www.blitzbasic.com/Community/posts.php?topic=69887 as well as checking for notices such as NEW VERSIONS and KNOWN BUGS.
Failing that, why not just email Patrick:
Abrexxes gmail dot com



See how this coulda been sorted weeks ago if only you'd yheeded advice given? :)


Guy Fawkes(Posted 2009) [#117]
well, ill need the dreamplayer thread too, cuz i wanna use that, and as stated above, theres a prob w/ it, its missing a bb file i think, or some functions.


Guy Fawkes(Posted 2009) [#118]
also, i just read the whole topic over bass, and no where did i find a bass upgrade


Abrexxes(Posted 2009) [#119]
If you download bass from the toolbox you HAVE the lattest version. But....("¦!...eargh...!&#3*)....you know..the problem is not bass and not blitzbasic and not BBS or Imphenzia. That is what i am shure.

The next update i will try to add some debug and help stuff for absolutely beginners, thats all what i can do for you at the moment.

bye


Guy Fawkes(Posted 2009) [#120]
when will this update be finished? also, dreamplayer would work if only it had the rest of the code.


Guy Fawkes(Posted 2009) [#121]
how do i get version 02030003 as well as a fix for dreamplayer?


Ginger Tea(Posted 2009) [#122]
you know..the problem is not bass and not blitzbasic and not BBS or Imphenzia. That is what i am sure.


pebkac?


Abrexxes(Posted 2009) [#123]
pebkac


Guy Fawkes(Posted 2009) [#124]
whats pebkac? how do i get version 02030003 as well as a fix for dreamplayer?


Abrexxes(Posted 2009) [#125]
the last one...

See my signature..that IS 02030003. If you have this already, you have a problem with your system. I can not fix your system ore explain you how to use userlibs, there are (i think) tutorials on this board.

Dreamplayer dont need (as i wrote abouve) a fix, you need some other dlls, but that is a problem that i will see if i have time (copyrigth etc). But first of all if have to finish version 1.7.0 for all the users who are able to use bass.

While waiting, you can learn and spend your time to read tutorials.

bye


Ginger Tea(Posted 2009) [#126]
on a side note
not only has this thread caused me to think of making my own hex editor i might go back into the lab and read up on bitmap to wav conversions again too
ph33r my sounds like a helecopter flikr album


Abrexxes(Posted 2009) [#127]
oO omfg

Ginger Tea, you really need a time out after this topic. ^^


Guy Fawkes(Posted 2009) [#128]
according to the code u told me, i have 00000001, not 02030003. i checked ur sig, and u have nothing in ur profile about a sig.


Ginger Tea(Posted 2009) [#129]
too late ive already started a work log and am boiling many kettles on the subject
might even upload Elevator Music for Guantánamo Bay Volume 1 to the net (one track was a .bmp to .wav from some long forgotten program i was comparing)

the name was an in joke with another member of a 'band' i was in recording some scary fx on my bass after i got it back after it being on loan for an age, iir camp xray was there and what better way to opress the occupants than to have this piped day and night, id confess to anything just to get some ear plugs and i 'composed' it :D


Ginger Tea(Posted 2009) [#130]
Blitz Bass Studio (Audiolib for B3D/B+)

is his sig (as in signature) unless you have them turned off
although on his the blitz bass studio is a link


Abrexxes(Posted 2009) [#131]
@DarkShadowWing

I am sorry, but if i answer now, i am shure that i will be banned from this site.


Ginger Tea(Posted 2009) [#132]
im going to record 15 30 45 and 60 seconds of silence and 24 bitmaps at all current 4:3 resolutions ... that will keep me out of this thread ;)

edit:
/me notes the edit but didnt think it was aimed at him
/me dons white lab coat and gasps as a 4096*3072 .bmp clocks in at 36mb or about 3 and a half minutes


Guy Fawkes(Posted 2009) [#133]
@Gingertea, w/e... @abrexxes, how DARE you speak to me in that manner. I'm already having a bad day, and dont need to be treated like that. You know what? I'll do you all a favor and go to a different forum if answering a simple question is such a task for you.


Abrexxes(Posted 2009) [#134]
I'm already having a bad day


Well, as you can see in this thread, my day was not better. I can only recommand you to learn more about BB and how it works.

I will (i say it again) try to include some stuff in the next version to help you out.


Mahan(Posted 2009) [#135]
This thread has a little of everything: drama, geniuses(-self proclaimed) and DLL's.

Anyway, even though I'm not very interested in B3D audio (at this moment) I did download this bassmod and installed it, because I got curious who I was about to pity (In the immortal words of Mr. T)

I installed the bassmod (http://www.abrexxes.huntingsoftware.de/blitz/blitz_bass_studio.zip) and all the demos seem to work as they should.

I've even made an step-by-step instruction (with very basic steps provided) of what i did to get it working:

1) downloaded file.
2) unzipped file into a new folder
3) entered blitz_bass_studio\bassmod\userlib
4) Copied BASSMOD.decls to the <Path to Blitz3D>Blitz3D\userlibs. <Path to Blitz3D> is probably c:\program files\Blitz3D on your computer.
5) Copied BASSMOD.dll to a folder that is included in the system path (if you need instructions on how to set the path in windows go here: http://www.computerhope.com/issues/ch000549.htm)
5b) if step 5 seems to hard you may copy all mentioned DLL's to the C:\windows\system32 folder. This is ugly as you clutter down your system with stray dlls but its a little bit easier than to set the path.
6) entered blitz_bass_studio\bass\userlibs
7) copied all files with a .decls -ending to <Path to Blitz3D>Blitz3D\userlibs
8) copied all files with a .dll -ending to my dll-folder (on the system path from step 5, remember?)
9) entered blitz_bass_studio\bass
10) opened examples by double-clicking files ending with .bb in explorer (this starts Blitz3D automatically)
11) Started the examples by pressing F5 (when the window with Blitz3D in the title showed up on the screen)
12) If you get many Blitz3D windows that bugger you, you can click in the top of one windows frame (to "focus" it.) and press the ALT button and F4 button at once. (Important: Press the ALT-button and hold it and then press F4)

Should anyone fail installing bass using this step-by-step list, please provide information about which step didn't work out.


Guy Fawkes(Posted 2009) [#136]
thanks mahan, now if ur able to compile dreamplayer 2.5, u are freakin 1337 man!

cuz i think its missing some functions or bb :)


LineOf7s(Posted 2009) [#137]
The only thing keeping you from compiling the DreamPlayer source (if you have the BASS and BASSMOD .decls and .ddl files in the right place) is a dll dealing with system GUI elements. I didn't look any further.

The good news though, is you don't need to compile DreamPlayer. The line that finds the length of the loaded music file is
CLen=BASS_ChannelGetLength(BassHandle)

Focus on learning about that command.


Guy Fawkes(Posted 2009) [#138]
@lineof7s, its this function it cant find: function dp_init() it says function dp_init() not found for dreamplayer 2.5.

and what ddl files? where cn i get the ddl files, cuz i think that may be why it wont compile. :)


LineOf7s(Posted 2009) [#139]
I know what functions it can't find. My point is they're not relevant, because you don't need to be able to compile Dreamplayer to be able to do what you (seem to) want.

The .decls and .dll files you require are in the Blitz Bass Studio download I (and others) have linked you to earlier. Read Mahan's post of earlier. Go from there.

Be seen to be making an effort.


Abrexxes(Posted 2009) [#140]
@DarkShadowWing

open the current bass.bb and add this line at the top
Const BASSVERSION = 33751043 ; (Hex: 02030003)


Add this at the end

Function BASS_CheckVersion% ()
Local temp%
	temp = BASS_GetVersion()
		If temp <> BASSVERSION	RuntimeError "Sorry, wrong BASS Version loaded"
Return 0
End Function

Function BASS_Debug%(message$="none")
   Local errorstring$
   Local current% = BASS_ErrorGetCode()
      If current <>0
         errorstring = BASS_GetErrorString()
         BASS_Free()
         If message <> "none"  RuntimeError message +" : " +errorstring
         If message = "none"  RuntimeError errorstring
      EndIf   
   
   Return 0
End Function 


BASS_CheckVersion you can use after the BASS_Init command, if a wrong version is loaded your program will stop.

BASS_Debug() you can use after each BASS command, if there is a problem your application will stop with an error Message. You can add your own Text like "BASS_Debug("Sound SFX adjust").

All this will be included in the next version.

bye


Guy Fawkes(Posted 2009) [#141]
anrexxes, are you saying 00000001 IS 02030003?

if not, then where can i download 02030003?

thanks! :)

~DarkShadowWing~


Abrexxes(Posted 2009) [#142]
Is 0000001 the same as 02030003?

I dont know a 0000001 version, that must be a very old dll.

Here: http://www.blitzbasic.com/toolbox/toolbox.php?tool=207 you can find 02030003

bye


Guy Fawkes(Posted 2009) [#143]
abrexxes, this IS where i downloaded 00000001 from. could you reupload the dll? :)

~DarkShadowWing~


Abrexxes(Posted 2009) [#144]
No, but please look if in your windows/system32 folder if there is another bass.dll. If yes, delete this one.

I really dont know what you have for a problem.


Guy Fawkes(Posted 2009) [#145]
the problem is i have 00000001 i explained that before.. i need version 02020003..


Guy Fawkes(Posted 2009) [#146]
abrexxes, this is rediculous. how many of you can run demo_beep.bb without 1 error?


Guy Fawkes(Posted 2009) [#147]
i have done some research abrexxes, you need to upload the 02030003 dll. why? because i have PROOF it wont work.

here's the link:

http://www.mediafire.com/download.php?qe1jguvinmy

How to:

Put both decls in your userlibs folder. if you dont have a userlibs folder then make one in C:/Program Files/Blitz3d and then put the 2 decls in there.

Next, create a folder called mp3, and put an mp3 in it.

now try to compile. you wont be able to as a function called BASS_ChannelPlay as well as a few others were not found.

~DarkShadowWing~


Barnabius(Posted 2009) [#148]
how many of you can run demo_beep.bb without 1 error?


Don't know about others, but after reading this hilarious thread I just could not help it. I had to try it out. So I've downloaded everything from Abrexxes's links and... well... it worked. Then I tried the rest of the demo stuff and... yes... they all worked.

Oh, yes. BASS version is 02020003.

Barney


Guy Fawkes(Posted 2009) [#149]
did u try the above link?


Mahan(Posted 2009) [#150]
@Dark I just wanted to recommend you follow up Abrexxes idea:

http://www.mythicsoft.com/agentransack/
(look for the download link at the bottom of the page)

Agent Ransack is a superb (and freeware) file search util (regexp. etc). You could use it to make sure you don't have other DLL's in your system with the same names (i.e. like bass.dll) somewhere. Just to make sure.


Abrexxes(Posted 2009) [#151]
Ok, final story.

After 6 hours of tests, i know whats going on.

BBS is only compatible with the version 2.3.0.3 (or the older build 2.3.0.2, but this is not longer supported). This version is included in the current BBS Version AND in the Dreamplayer25.exe download.

With version 2.2.x.x the Api Call for the BASS_GetVersion command has changed, thats why you can not get the right version with older bass.dll versions. (There was no version of 2.2.x.x or older compatible with BBS)

Conclusion: Somewhere in your "system" there is an older version of the bass dll, loaded at dll call and NOT compatible to BBS. Note: Never, NEVER (Absolutely NEVER) copy a bass.dll in the windows folder. This is agains Microsoft law and makes only version trouble with other programms (using older or newer bass versions).

If you have a problem if bass is NOT in the windows folder, your windows installation (system) is simply corrupt. It is not a solutions to make your system more corrupt by copying everything in your windows folder. Fix your installation. That is better for you, and better for your future customers.

Versions:

00000001 = should be version 1.8.x.x by Rob Hutchinson (BBS is NOT compatible)
00080001 = should be version 2.1.x.x by Oliver Skawronek aka Vertex (BBS not compatible)
020200xx = Version 2.2.x.x (BBS not 100% compatible, not supported)
0203000x = Version 2.3.0.x (BBS 100% compatible, last version = 02030003)


My downloads are all 100% working and have the right bass.dll versions in side. You can use this code after installing BBS to check if there is another version somewhere.

BASS_Init(-1,44100,0,0,0)
version = BASS_GetVersion()
Print "Bass version : " +Hex$(version)
BASS_Free()
WaitKey
End


If you can not see 02030003, it is "not" "my" "problem".

bye

btw, since i start with BBS, i have more than 8000 Downloads.....and "one" 00000001 "bug" ;)

and finaly a new BASS_CheckVersion update (see code above)
Function BASS_CheckVersion% ()
Local temp%
	temp = BASS_GetVersion()
		If temp <> BASSVERSION	RuntimeError "Sorry, wrong BASS Version "+Hex$(temp) +" loaded !"
Return 0
End Function



John Blackledge(Posted 2009) [#152]
I don't expect anyone to really read this code.
It's here just to make the point that, without previous experience of BBS, (after a false start, like you, by having an old dll) I have a complete 3D sound-system in place using bass.

DSW - there really is _no_ problem. Time to stop blaming Abrexxes.

Abrexxes - many thanks again for all your very appreciated work.



Mahan(Posted 2009) [#153]



Guy Fawkes(Posted 2009) [#154]
you actually have the NERVE to blame a false installation on me having 00000001? i hope ur kidding cuz i followed the guide like u said, and i have 00000001.

where u get 02020003, i dont know, but if i have to i will rip through every damn forum til i find it. im SO sick of stuff not working..

now if u excuse me, i have to study for college so i can make something of my life.

ill post a bit later

~DS~


Guy Fawkes(Posted 2009) [#155]
Ok, I apologize abrexxes, I FINALLY found it. you guys never told me the current dll was in spectrum.


Guy Fawkes(Posted 2009) [#156]
now my final & only question is. where do u get the lib for dp_init() ?


LineOf7s(Posted 2009) [#157]
ffs


Guy Fawkes(Posted 2009) [#158]
ffs? whats ffs?


John Blackledge(Posted 2009) [#159]
DSW - there was no false installation.

Abrexxes - I'll say it for you:

(When it finally gets to insults)
Mods, time to close this thread down, please.


Guy Fawkes(Posted 2009) [#160]
well excuse me. geez. if u guys had said its in spectrum, this thread wouldve been finished weeks ago. but no, u had to give me a hard time. so yes, mods, go ahead and close this. i have dream player 2.3 anyway. i dont need 2.5.


Warner(Posted 2009) [#161]
What is 'in spectrum?'


Guy Fawkes(Posted 2009) [#162]
the dll that i needed


Warner(Posted 2009) [#163]
Ah.. okay I read it as something along the lines of 'in scope'. Thanks for clearing this up.


LineOf7s(Posted 2009) [#164]
..except it wasn't just "in spectrum", ever.


Abrexxes(Posted 2009) [#165]
Oh, i removed spectrum 10 minutes ago, there is a new demo now. I hope the dll is inside X)