Skip Menu |

This queue is for tickets about the Device-Cdio CPAN distribution.

Report information
The Basics
Id: 20862
Status: resolved
Priority: 0/
Queue: Device-Cdio

People
Owner: Rocky Bernstein (no email address)
Requestors: bitcard.org [...] fremnet.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v0.2.3
Fixed in: (no value)



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)
Patch applied in CVS. But to make this more generally visable a method in Device::Cdio::Tracks is needed which I've just also added. Also added a regression test for the routine. And there were some subsidiary doc fixes too. Thanks for the patch.