]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia/cdbase.cpp
1 ////////////////////////////////////////////////////////////////////////////////
4 // Author: Guilhem Lavaux
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // License: wxWindows license
9 ////////////////////////////////////////////////////////////////////////////////
11 #pragma implementation
13 #include "wx/wxprec.h"
20 wxCDtime
wxCDAudio::CDtoc::GetTrackTime(wxUint8 track
) const
22 if (track
> total_time
.track
) {
23 wxCDtime dummy_time
= {0, 0, 0, 0};
26 return tracks_time
[track
];
29 wxCDtime
wxCDAudio::CDtoc::GetTrackPos(wxUint8 track
) const
31 if (track
> total_time
.track
) {
32 wxCDtime dummy_time
= {0, 0, 0, 0};
35 return tracks_pos
[track
];
38 bool wxCDAudio::Play(const wxCDtime
& beg_play
)
40 return Play(beg_play
, GetToc().GetTotalTime());
43 bool wxCDAudio::Play(wxUint8 beg_track
, wxUint8 end_track
)
45 wxCDtime beg_play
= GetToc().GetTrackPos(beg_track
);
49 end_play
= GetToc().GetTrackPos(end_track
);
51 end_play
= GetToc().GetTotalTime();
52 return Play(beg_play
, end_play
);