comparison src/modplug/plugin.cxx @ 1539:488f7e6c36ed

Tuple builder for modplug. Someone do me a favour and fix getinfo to do something like the one in console.
author Tony Vroon <chainsaw@gentoo.org>
date Thu, 30 Aug 2007 23:38:01 +0100
parents 195b5657303e
children 58f03e54b97a
comparison
equal deleted inserted replaced
1538:da1aa3c38cda 1539:488f7e6c36ed
2 * Authors: Kenton Varda <temporal@gauge3d.org> 2 * Authors: Kenton Varda <temporal@gauge3d.org>
3 * 3 *
4 * This source code is public domain. 4 * This source code is public domain.
5 */ 5 */
6 6
7 #include "audacious/plugin.h"
8 #include "modplug.h" 7 #include "modplug.h"
9 #include "gui/main.h" 8 #include "gui/main.h"
9 extern "C" {
10 #include "audacious/plugin.h"
11 #include "audacious/tuple.h"
12 #include "audacious/tuple_formatter.h"
13 }
10 14
11 extern InputPlugin gModPlug; 15 extern InputPlugin gModPlug;
12 16
13 static void Init(void) 17 static void Init(void)
14 { 18 {
42 46
43 static void Seek(InputPlayback *data, int aTime) 47 static void Seek(InputPlayback *data, int aTime)
44 { 48 {
45 gModplugXMMS.Seek(float32(aTime)); 49 gModplugXMMS.Seek(float32(aTime));
46 } 50 }
51
47 static int GetTime(InputPlayback *data) 52 static int GetTime(InputPlayback *data)
48 { 53 {
49 float32 lTime; 54 float32 lTime;
50 55
51 lTime = gModplugXMMS.GetTime(); 56 lTime = gModplugXMMS.GetTime();
56 } 61 }
57 62
58 static void GetSongInfo(char* aFilename, char** aTitle, int* aLength) 63 static void GetSongInfo(char* aFilename, char** aTitle, int* aLength)
59 { 64 {
60 gModplugXMMS.GetSongInfo(aFilename, *aTitle, *aLength); 65 gModplugXMMS.GetSongInfo(aFilename, *aTitle, *aLength);
66 }
67
68 static Tuple* GetSongTuple(char* aFilename)
69 {
70 return gModplugXMMS.GetSongTuple(aFilename);
61 } 71 }
62 72
63 void ShowAboutBox(void) 73 void ShowAboutBox(void)
64 { 74 {
65 ShowAboutWindow(); 75 ShowAboutWindow();
104 NULL, 114 NULL,
105 NULL, 115 NULL,
106 GetSongInfo, 116 GetSongInfo,
107 ShowFileInfoBox, 117 ShowFileInfoBox,
108 NULL, // output 118 NULL, // output
109 NULL, // tuple 119 GetSongTuple,
110 NULL, 120 NULL,
111 NULL, 121 NULL,
112 CanPlayFileFromVFS, // vfs 122 CanPlayFileFromVFS, // vfs
113 (gchar **)fmts, 123 (gchar **)fmts,
114 }; 124 };