comparison src/sid/xmms-sid.c @ 1476:c6947f95fd2a

converted sid plugin to new tuple system
author Giacomo Lozito <james@develia.org>
date Sat, 11 Aug 2007 23:56:22 +0200
parents 195b5657303e
children d1671cf98196
comparison
equal deleted inserted replaced
1475:1c5688582a4e 1476:c6947f95fd2a
938 /* Free tune information */ 938 /* Free tune information */
939 xs_tuneinfo_free(pInfo); 939 xs_tuneinfo_free(pInfo);
940 } 940 }
941 941
942 942
943 TitleInput * xs_get_song_tuple(gchar *songFilename) 943 t_xs_tuple * xs_get_song_tuple(gchar *songFilename)
944 { 944 {
945 t_xs_tuneinfo *pInfo; 945 t_xs_tuneinfo *pInfo;
946 TitleInput *pResult = NULL; 946 t_xs_tuple *pResult = NULL;
947 947
948 /* Get tune information from emulation engine */ 948 /* Get tune information from emulation engine */
949 pInfo = xs_status.sidPlayer->plrGetSIDInfo(songFilename); 949 pInfo = xs_status.sidPlayer->plrGetSIDInfo(songFilename);
950 if (!pInfo) 950 if (!pInfo)
951 return NULL; 951 return NULL;
955 gint tmpInt; 955 gint tmpInt;
956 956
957 pResult = xs_make_titletuple(pInfo, pInfo->startTune); 957 pResult = xs_make_titletuple(pInfo, pInfo->startTune);
958 958
959 tmpInt = pInfo->subTunes[pInfo->startTune-1].tuneLength; 959 tmpInt = pInfo->subTunes[pInfo->startTune-1].tuneLength;
960 #ifdef AUDACIOUS_PLUGIN
961 if (tmpInt < 0)
962 tuple_associate_int(pResult, "length", -1);
963 else
964 tuple_associate_int(pResult, "length", tmpInt * 1000);
965 #else
960 if (tmpInt < 0) 966 if (tmpInt < 0)
961 pResult->length = -1; 967 pResult->length = -1;
962 else 968 else
963 pResult->length = (tmpInt * 1000); 969 pResult->length = (tmpInt * 1000);
970 #endif
964 } 971 }
965 972
966 /* Free tune information */ 973 /* Free tune information */
967 xs_tuneinfo_free(pInfo); 974 xs_tuneinfo_free(pInfo);
968 975