Subject: | cdio_get_track_msf (addition) |
Not a bug, but a feature addition.
I'm new at this swig stuff so I'll leave it for you guys to edit/fix if
need be, but the patch is working for me.
get_track_msf is not included in the default track.swg, I've provided a
replacement that returns msf in a string format or 'error' on failure.
Subject: | Device-Cdio-get_track_msf.patch |
--- track.swg 2006-03-23 14:02:35.000000000 +1000
+++ track.swg 2006-08-06 10:30:09.000000000 +1000
@@ -165,7 +165,28 @@
bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track,
/*out*/ msf_t *msf);
#endif
+%feature("autodoc",
+"get_track_msf(cdio,track)->string
+
+Return the starting MSF (minutes/secs/frames) for track number
+
+@return string mm:ss:ff if all good, or string 'error' on error.");
+const char *get_track_msf(const CdIo_t *p_cdio, track_t i_track);
+%inline %{
+const char *get_track_msf(const CdIo_t *p_cdio, track_t i_track)
+{
+ msf_t msf;
+ char *psz_msf;
+
+ if (!cdio_get_track_msf( p_cdio, i_track, &msf )) {
+ return "error";
+ }
+ psz_msf = cdio_msf_to_str( &msf );
+ return psz_msf;
+}
+%}
+
%rename cdio_get_track_preemphasis get_track_preemphasis;
%feature("autodoc",
"cdio_get_track_preemphasis(cdio, track)