|
|
|
|
#1 |
|
Mostly Harmless
(Alumni) Join Date: Jan 2001
Location: UK
Posts: 2,319
|
MetaDB question
Has anyone managed to get metadb_getMetaData to return anything sensible with numeric types such as MT_LENGTH, or is it just me? All I seem to be able to get is rubbish. Maybe it's just because I'm not a C++ programmer at heart but it seems a bit stupid returning a number using a char* type
.I'm 99% finished on a new Winamp3/mIRC plugin which works using the new mIRC SendMessage interface, and is hopefully more configurable than my previous one . I'd like to get track length and so implemented though.
For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave. |Musicbrainz|Audioscrobbler|last.fm| |
|
|
|
|
#2 |
|
Monkey Hump Master
Join Date: Apr 2000
Posts: 782
|
It returns the number of milliseconds. So 10000 is ten seconds long. Also, it uses a char* interface along with a type parameter so one function can access any kind of metadata.
--Brennan |
|
|
|
|
#3 |
|
French Canadian
(Alumni) |
since you know it's an int, you'd do something like this to make the return value what you need it to be:
int * len = (int *)metadb_getMetaData(...); --aus Aus -- NoisePort.Org, chronicles of the french canadian alien (Temporarly down during the move). |
|
|
|
|
#4 |
|
Monkey Hump Master
Join Date: Apr 2000
Posts: 782
|
No... no, you wouldn't. That's plain wrong. Ignore what he just said.
You would do: int val=0; api->metadb_getMetaData(playstring, MT_LENGTH, (char *)&val, sizeof(val), MDT_INT); --Brennan |
|
|
|
|
#8 |
|
Mostly Harmless
(Alumni) Join Date: Jan 2001
Location: UK
Posts: 2,319
|
Ah that makes it a bit clearer... types in C++ confuuse me
.
For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave. |Musicbrainz|Audioscrobbler|last.fm| |
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|