* Adds a variable if_xmms2_connected to hide objects when xmms2d is not
running (thanks Lassi)
* Fix for buffer overflow with $execi (thanks Cesare)
+ * Fetch volume through Audacious API (thanks Erik)
2008-12-06
* Removed duplicate sanity check for diskio
Title of current tune with optional maximum length specifier
<para></para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>
+ <command><option>audacious_main_volume</option></command>
+ </term>
+ <listitem>
+ The current volume fetched from Audacious
+ <para></para></listitem>
+ </varlistentry>
<varlistentry>
<term>
{
static audacious_t items;
gint playpos, frames, length;
- gint rate, freq, chans;
+ gint rate, freq, chans, vol;
gchar *psong, *pfilename;
#ifndef AUDACIOUS_LEGACY
/* Playlist position (index of song) */
snprintf(items[AUDACIOUS_PLAYLIST_POSITION],
sizeof(items[AUDACIOUS_PLAYLIST_POSITION]) - 1, "%d", playpos + 1);
+ /* Main volume */
+ vol = audacious_remote_get_main_volume(session);
+ snprintf(items[AUDACIOUS_MAIN_VOLUME],
+ sizeof(items[AUDACIOUS_MAIN_VOLUME]) - 1, "%d", vol);
+
} while (0);
/* Deliver the refreshed items array to audacious_items. */
timed_thread_lock(info.audacious.p_timed_thread);
AUDACIOUS_FILENAME,
AUDACIOUS_PLAYLIST_LENGTH,
AUDACIOUS_PLAYLIST_POSITION,
+ AUDACIOUS_MAIN_VOLUME,
};
/* 12 slots for the audacious values */
-typedef char audacious_t[12][128];
+typedef char audacious_t[13][128];
/* type for data exchange with main thread */
typedef struct audacious_s {
OBJ_audacious_filename,
OBJ_audacious_playlist_length,
OBJ_audacious_playlist_position,
+ OBJ_audacious_main_volume,
OBJ_audacious_bar,
#endif
#ifdef BMPX
END OBJ(audacious_filename, INFO_AUDACIOUS)
END OBJ(audacious_playlist_length, INFO_AUDACIOUS)
END OBJ(audacious_playlist_position, INFO_AUDACIOUS)
+ END OBJ(audacious_main_volume, INFO_AUDACIOUS)
END OBJ(audacious_bar, INFO_AUDACIOUS)
scan_bar(arg, &obj->a, &obj->b);
#endif
snprintf(p, p_max_size, "%s",
cur->audacious.items[AUDACIOUS_PLAYLIST_POSITION]);
}
+ OBJ(audacious_main_volume) {
+ snprintf(p, p_max_size, "%s",
+ cur->audacious.items[AUDACIOUS_MAIN_VOLUME]);
+ }
OBJ(audacious_bar) {
double progress;