[CLAM] Question regarding CLAM::Audio::GetEndTime()
Bad Data
djr4g3 at yahoo.com
Thu Feb 1 22:26:51 PST 2007
I've starting to work with CLAM and have come across something that I don't understand. I started with the FilePlayback_example.cxx to get a basic idea how Audio is worked with. I changed the main loop of the program around to see what can be done with the Audio class, during one such test I did the following:
while( reader.Do( incomingAudioChannels ) )
{
count += incomingAudioChannels[0].GetSize();
time += incomingAudioChannels[0].GetDuration();
for ( int i = 0; i < audioOutputs.Size(); i++ ){
audioOutputs[i].Do( incomingAudioChannels[i] );
}
std::cout << "Durr: " << incomingAudioChannels[0].GetEndTime() << "\n"; // I added this line.
}
when I compile and run this program the first few lines output to stdout are:
audioMixer examples # ./FilePlayback_example blue_serge.wav
Durr: 23.22
Durr: 23.2432
Durr: 23.2664
Durr: 23.2896
Durr: 23.3128
Durr: 23.3361
Durr: 23.3593
Shouldn't the first line be 0.002322 and aren't the subsequent lines off by 23.22?
It's my understanding that GetEndTime() returns the end time of the audio in ms, and that the first chunk is only 1024 samples long. Am I misunderstanding the correct use?
James
---------------------------------
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20070201/10a7a796/attachment-0001.html>
More information about the clam-users
mailing list