Some facts about Winmote and the crashing bug
Von FunnyDingo | 18. Mai 2008, 21:50
On the Wiimote project page I wrote about the small bug in the Winamp plugin Winmote: if a Wiimote is connect and you close Winamp, it crashes. My first idea: the Wiimote isn't disconnected properly. The Winamp API defines a "quit" function. This is a function provided by the plugin and called by Winamp if it should close. In this function I placed this code (I know, not nice, but for testing it's ok):
-
void quit()
-
{
-
while (wiimoteHandler->IsConnected())
-
{
-
wiimoteHandler->Disconnect();
-
}
-
}
WInamp close but crashes also. So, the Wiimote is disconnected. Here my next test (I know, very stupid, but testing...):
-
void quit()
-
{
-
wiimote->Disconnect();
-
MessageBox(NULL, "Wiimote disconnected", PLUGIN_NAME, MB_OK);
-
}
This works. After click OK in the message box, Winamp closes normaly. But what is the problem? I checked out the code of the library and saw, that a method of it is threaded. My idea: closing Winamp and stoping the thread wich reads the data from the Wiimote conflicts in some way. If you use the MessageBox() the system has enough time to end thread.
Maybe someone has another idea?
PS: Sorry for bad code formating, but the plugin is new to me and I think there are some problems with wordpress for saving nbsp's. Also the plugin has a problem with some chars like >...
Keine Kommentare | Keine Trackbacks
Winmote 0.1 alpha released
Von FunnyDingo | 17. Mai 2008, 02:20
A small plugin for Winamp to control it via a Wiimote. Check out the project page!
Keine Kommentare | Keine Trackbacks
Winmote
Von FunnyDingo | 16. Mai 2008, 00:28
Winmote? Ja, richtig gelesen. Winmote ist ein Plugin für den Winamp, mit dessen Hilfe man diesen über die Wiimote steuern kann.
A = Abspielen
B = Stop
Links = vorheriger Titel
Rechts = Nächster Titel
+ = Lauter
- = Leiser
Das Plugin befindet sich noch in einem sehr frühen Alpha Stadium, aber sobald es Beta ist, werde ich eine Projektseite einrichten und es zum Download anbieten.
PS: Über Namensvorschläge wäre ich dankbar
PPS: Kommentare bitte auf der Projektseite hinterlassen