Go to the source code of this file.
Data Structures | |
struct | _scope_plugin |
Defines | |
#define | SCOPE_PLUGIN_BASE_VERSION 0x1000 |
#define | SCOPE_PLUGIN_VERSION (SCOPE_PLUGIN_BASE_VERSION + 7) |
#define | SCOPE_NICE 10 |
#define | SCOPE_SLEEP 20000 |
#define | SCOPE_BG_RED 0 |
#define | SCOPE_BG_GREEN 0 |
#define | SCOPE_BG_BLUE 0 |
Typedefs | |
typedef int | scope_version_type |
typedef int(* | scope_init_type )(void *arg) |
typedef void(* | scope_start_type )(void) |
typedef int(* | scope_running_type )(void) |
typedef void(* | scope_stop_type )(void) |
typedef void(* | scope_shutdown_type )(void) |
typedef void(* | scope_set_data_type )(void *buffer, int count) |
typedef void(* | scope_set_fft_type )(void *buffer, int samples, int channels) |
typedef _scope_plugin | scope_plugin |
typedef scope_plugin *(* | scope_plugin_info_type )(void) |
|
The value of the BLUE component of the default background color for scope windows. Value should be from 0-255 |
|
The value of the GREEN component of the default background color for scope windows. Value should be from 0-255 |
|
The value of the RED component of the default background color for scope windows. Value should be from 0-255 |
|
The default nice level scope plugins should be set at. Most scope plugins are just eye candy and as such should not interfere with other processes on your system. They should only use CPU cycles that would otherwise be wasted. Setting the scopes to a nice level of 10 or higher pretty much insures this. If you don't like this policy you can lower the value. Keep in mind that negative values will only work if you run the HOST as root |
|
The base version number of the scope plugin. Set at 0x1000 |
|
The version of the scope plugin API. This should be increased whenever structural changes are made to the API. This value should only be changed by the maintainers. |
|
The default sleep time in microseconds for scopes. After every render iteration a scope should sleep for this amount of time. You should use the dosleep() call i.e. dosleep(SCOPE_SLEEP). A value of 20000 will let scopes run at 100000/20000 = 50 frames per second. If the scopes are consuming too much CPU consider raising this value. |
|
The init function of a scope plugin. This function should initialize all data structures needed for the scope plugin. Return value should be 1 on success, 0 if initialization fails.
|
|
You should declare a scope_plugin variable and populate it with pointers of the specific functions implemented by your scope |
|
Every scope plugin should have a scope_plugin_info() function that returns a pointer to a scope_plugin structure that is filled with pointers to your function implementations. |
|
This function should tell the HOST if the scope is running i.e. on-screen and rendering. A value of 1 should be returned if this is the case, 0 if the scope is not active. |
|
|
|
|
|
The shutdown function is called just before the plugin is unloaded or just before the HOST decides to exit. All data structures allocated in the init routine should be freed here. |
|
This function will be called when the HOST wants to activate the scope. It should pop up the scope window and start rendering the PCM or FFT data |
|
This function should stop and close the scope window if it was running. It should just return if the scope is not running. |
|
The API this scope was compiled against. It should always be set to SCOPE_PLUGIN_VERSION. Failing to set this will most likely result in a scope plugin that won't load. |