Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Evil Noodle
23
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 5th Jul 2003 04:54
Hi,
Ive been playing around with mp3 files and was wondering if theres any way to read the extra details like track duration into dbpro?
Also I have been trying to determine the end of a track by using the music playing() command however it dosnt seem to register and dosnt move on to the next track. It probably me being a dumbass as usual but can anyone help please????



IF MUSIC PLAYING(1)=0 THEN delete music 1:INC choice,1:flag=0
T.A.F.K.A.C.M.O.T.D
The Artist Formally Known As Cut_Me_Own_Throat_Dibbler
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 5th Jul 2003 12:02
well i'm not sure if this would work but give it a try:

if music playing(1)=1
`do something
else
delete music 1 : INC choice,1 : flag=0
endif

hope this helps.

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 5th Jul 2003 16:03
music playing() doesnt work, as far as I am aware. Its not you being a dumb ass, it's DB being a twat.

As for reading the header data, you'll probably have to get a technical document from somewhere on how MP3 headers are structured, and then read in the MP3 as a file or memblock if possible, and extract the information yourself.

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
Evil Noodle
23
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 5th Jul 2003 16:09
Thanks Shady Simpson and Fallout. I Wish i knew it didnt work, ive been pulling my hair out for 2 days now trying to see what ive done wrong , is there any word on if it will be fixed in the next patch? If not is there any alternatives to determining the end of a track? Thanks again

T.A.F.K.A.C.M.O.T.D
The Artist Formally Known As Cut_Me_Own_Throat_Dibbler
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Jul 2003 16:26
Package up a simple example program with the MP3 and send it to Lee (lee@darkbasic/com) - If he's already fixed it, he'll tell you. If it's a new bug, he'll tell you ... it may take a couple of days for him to reply.
Evil Noodle
23
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 5th Jul 2003 17:30
will do ,cheers Ian

T.A.F.K.A.C.M.O.T.D
The Artist Formally Known As Cut_Me_Own_Throat_Dibbler
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 5th Jul 2003 17:57
In the mean time, as long as you know the length of the MP3, you could always do something like this:

musiclength = (type in length of music in milliseconds)
play music 1
musicstart = timer()

then elsewhere in your code:

if timer() >= musicstart+musiclength
loop music, or stop music or whatever
endif

Machine: P4 2200, 1GB RAM, GeForce4 64MB, Audigy Platinum
http://www.breakbeat-terrorism.co.uk
(It's not all about the coding)
Evil Noodle
23
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 5th Jul 2003 18:07 Edited at: 5th Jul 2003 18:10
I was thinking that ,however the program is an archiver/player so I would like to find out how to read the mp3 properties to auto find the length. thanks for the thought though

Ive sent an email to lee on the subject so I will await his reply :-s

p.s I may be onto something:-

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=79

T.A.F.K.A.C.M.O.T.D
The Artist Formally Known As Cut_Me_Own_Throat_Dibbler
Sly D
23
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 6th Jul 2003 00:51
Try here http://www.wotsit.org/search.asp?page=5&s=music
it has information on ALL formats and on that page is MP3 format info.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th Jul 2003 01:32
See this thread on RGT. Apparently fixed in U5. Yipee!

http://www.realgametools.net/forums/index.php?board=18;action=display;threadid=16374

R Tape loading error
Evil Noodle
23
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 7th Jul 2003 02:52
x-d

T.A.F.K.A.C.M.O.T.D
The Artist Formally Known As Cut_Me_Own_Throat_Dibbler

Login to post a reply

Server time is: 2026-07-17 17:23:27
Your offset time is: 2026-07-17 17:23:27