shaohao
08-04-2005, 05:10 PM
Hi, Paul:
I wanna know how QCD (QMP) calculate the track time through "TrackExtents" struct.
Are both of below codez same?
one is set the "ext->end" to the duration of a track in ms and set "ext->unitpersec" to 1000ms=1s.
int GetTrackExtents(const char* medianame, TrackExtents *ext, int flags)
{
ext->track = 1;
ext->start = 0;
ext->end = duration_in_ms;
ext->bytesize = file_length;
ext->unitpersec = 1000;
}
The other one is set the "ext->end" to the total number of samples of a track and set "ext->unitpersec" to dwSamplesPerSecond=1s (also srate=1s).
int GetTrackExtents(const char* medianame, TrackExtents *ext, int flags)
{
ext->track = 1;
ext->start = 0;
ext->end = numsamples;
ext->bytesize = file_length;
ext->unitpersec = dwSamplesPerSecond;
}
Are they exactly same? which one is more accurate to calculate a track's time?
I wanna know how QCD (QMP) calculate the track time through "TrackExtents" struct.
Are both of below codez same?
one is set the "ext->end" to the duration of a track in ms and set "ext->unitpersec" to 1000ms=1s.
int GetTrackExtents(const char* medianame, TrackExtents *ext, int flags)
{
ext->track = 1;
ext->start = 0;
ext->end = duration_in_ms;
ext->bytesize = file_length;
ext->unitpersec = 1000;
}
The other one is set the "ext->end" to the total number of samples of a track and set "ext->unitpersec" to dwSamplesPerSecond=1s (also srate=1s).
int GetTrackExtents(const char* medianame, TrackExtents *ext, int flags)
{
ext->track = 1;
ext->start = 0;
ext->end = numsamples;
ext->bytesize = file_length;
ext->unitpersec = dwSamplesPerSecond;
}
Are they exactly same? which one is more accurate to calculate a track's time?