Iron Curtain

From SlugWiki
Revision as of 01:19, 3 March 2008 by ARWest (Talk)

Jump to: navigation, search
A prototype of the Iron Curtain displaying a traveling wave.

Overview

An LED display built out of LED boards from some dead guy at TEP.

XMMS Plugin

Use the functions in xmms-1.2.11/libxmms/xmmsctrl.h to get data other than frequency and PCM data. Useful functions include:

gint xmms_remote_get_output_time(gint session);
gint xmms_remote_get_playlist_length(gint session);
gchar *xmms_remote_get_playlist_file(gint session, gint pos);
gchar *xmms_remote_get_playlist_title(gint session, gint pos);
gint xmms_remote_get_output_time(gint session);
gboolean xmms_remote_is_playing(gint session);
gboolean xmms_remote_is_paused(gint session);
gboolean xmms_remote_is_shuffle(gint session);
gboolean xmms_remote_is_repeat(gint session);
int xmms_remote_get_main_volume(gint session);
int xmms_remote_get_balance(gint session);
int xmms_remote_get_playlist_pos(gint session);

Data format streamed from the XMMS Plugin to user programs via named_pipes. There are two types of data: Information data about the state of XMMS and frequency data from the playing song. Each is preceded by an id number followed by the bytes of relevant data.

Frequency Data:
4 bytes (int32): Id, which is 1 for frequency data
4 bytes (int32): time into song in milliseconds
512 bytes (int16): the 256 frequency values for channel 0
512 bytes (int16): the 256 frequency values for channel 1

Information Data:
4 bytes (int32): Id, which is 2 for information data
4 bytes (int32): tb, the number of bytes in title
tb bytes (char): the title of the currently playing song
4 bytes (int32): is_paused. 1 if true, else 0.
4 bytes (int32): is_playing. 1 if true, else 0.
4 bytes (int32): is_shuffle. 1 if true, else 0.
4 bytes (int32): is_repeat. 1 if true, else 0.
4 bytes (int32): volume, [0,100]
4 bytes (int32): balance, [-100 (all left),100 (all right)]

Each named pipe should have only one user. The current named pipes are given below. Contact Lyric if you want one.

Pipe Name User
magical_trevor lyric
corn_cob arwest
hash_pipe natech