Mercurial > audlegacy-plugins
comparison src/sexypsf/plugin.c @ 1353:b5705eea23d9
sexypsf: new threading model
| author | William Pitcock <nenolod@atheme-project.org> |
|---|---|
| date | Mon, 23 Jul 2007 17:53:45 -0500 |
| parents | c39a61e6a276 |
| children | 761e17b23e0c |
comparison
equal
deleted
inserted
replaced
| 1352:ab66f3ee7a11 | 1353:b5705eea23d9 |
|---|---|
| 51 if (!memcmp(magic, "PSF\x01", 4)) | 51 if (!memcmp(magic, "PSF\x01", 4)) |
| 52 return 1; | 52 return 1; |
| 53 return 0; | 53 return 0; |
| 54 } | 54 } |
| 55 | 55 |
| 56 | |
| 57 void sexypsf_update(unsigned char *buffer, long count) | 56 void sexypsf_update(unsigned char *buffer, long count) |
| 58 { | 57 { |
| 59 const int mask = ~((((16 / 8) * 2)) - 1); | 58 const int mask = ~((((16 / 8) * 2)) - 1); |
| 60 | 59 |
| 61 while (count > 0) | 60 while (count > 0) |
| 155 gchar *name = get_title_psf(data->filename); | 154 gchar *name = get_title_psf(data->filename); |
| 156 sexypsf_ip.set_info(name, PSFInfo->length, 44100*2*2*8, 44100, 2); | 155 sexypsf_ip.set_info(name, PSFInfo->length, 44100*2*2*8, 44100, 2); |
| 157 g_free(name); | 156 g_free(name); |
| 158 | 157 |
| 159 playing = 1; | 158 playing = 1; |
| 160 dethread = g_thread_create((GThreadFunc)sexypsf_playloop, | 159 dethread = g_thread_self(); |
| 161 NULL, TRUE, NULL); | 160 sexypsf_playloop(NULL); |
| 162 } | 161 } |
| 163 } | 162 } |
| 164 | 163 |
| 165 static void sexypsf_xmms_stop(InputPlayback * playback) | 164 static void sexypsf_xmms_stop(InputPlayback * playback) |
| 166 { | 165 { |
