Help - Search - Members - Calendar
Full Version: A couple of quick questions.
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
MWP
Hi guys,

Q1 - Is the spectrum data size always 256 samples, or does it change quite often... how big/small can it get?

Q2 - What SDK examples should i be looking at for info on how to control play functions (start/stop/next-track/etc) and also current status (current track name, track length, position, etc).

Thanks biggrin.gif
foosion
QUOTE(MWP @ Nov 19 2003, 12:45 PM)
Q1 - Is the spectrum data size always 256 samples, or does it change quite often... how big/small can it get?

Currently yes AFAIK, but you should not rely on that.

QUOTE(MWP @ Nov 19 2003, 12:45 PM)
Q2 - What SDK examples should i be looking at for info on how to control play functions (start/stop/next-track/etc) and also current status (current track name, track length, position, etc).

Look at classes play_control, metadb_handle, file_info. Depending on what you want to do, playlist_oper could be useful as well.
MWP
Thanks.
MWP
Another question...

Is there a function i can use in my DLL that will be called when FB2K starts and shuts down?

Thanks.
PiX_Da_MiX
Yes i need that to because in a plugin y open a window which the parrent is not foobar an when i close foobar i got the error 1 metdb_handle leaks
foosion
QUOTE(MWP @ Dec 2 2003, 04:52 PM)
Is there a function i can use in my DLL that will be called when FB2K starts and shuts down?

Use the initquit service. Create a subclass of either initquit or initquit_autoreg (the latter brings its own service factory), or use initquit_simple.
MWP
That did it, thanks again foosion.
MWP
And again....

How do i use "string_base" ?

I want to get the meta data of the current track given by "on_playback_time" using "track->handle_query_meta_field"

I cant work out what im meant to use as the 3rd parameter.

Even tho i havnt got it working yet, "on_playback_time" comments say its called every second, is there any way to speed this up?
I would be looking for faster than 40mS.
foosion
QUOTE(MWP @ Dec 3 2003, 05:00 PM)
How do i use "string_base" ?

I want to get the meta data of the current track given by "on_playback_time" using "track->handle_query_meta_field"

I cant work out what im meant to use as the 3rd parameter.

Look at the SDK (pfc/string.h):
string_base is an abtract base class, its subclass string8 implements all the abstract methods.
Example:
CODE
string8 value;
track->handle_query_meta_field(name, 0, value);
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.