This is what I'm doing for every chunk:<br> std::cout << "EndTime: " << incomingAudioChannels[0].GetEndTime() <br> << " Size: " << incomingAudioChannels[0].GetSize()<br> << " BeginTime " << incomingAudioChannels[0].GetBeginTime()<br> << "\n";<br><br><br>And this is what it is outputing:<br><br>audioMixer examples # ./FilePlayback_example blue_serge.wav
<br>EndTime: 23.22 Size: 1024 BeginTime 0<br>EndTime: 23.2432 Size: 1024 BeginTime 0.02322<br>EndTime: 23.2664 Size: 1024 BeginTime 0.0464399<br>EndTime: 23.2896 Size: 1024 BeginTime 0.0696599<br><br><br>James<br><br><br><b><i>Xavier Amatriain <xamat@iua.upf.edu></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> That is weird indeed but I can't see the bug by looking at the code. It <br>is clear that BeginTime is set incorrectly for the first audio. Can you <br>print both GetSize() and GetBeginTime() for all chunks?<br><br>Bad Data wrote:<br>> I've starting to work with CLAM and have come across something that I <br>> don't understand. I started with the FilePlayback_example.cxx to get a <br>> basic idea how Audio is worked with. I changed the main loop of the <br>> program around to see what can be done with the Audio class, during <br>> one such test I did the
following:<br>><br>> while( reader.Do( incomingAudioChannels ) )<br>> {<br>> count += incomingAudioChannels[0].GetSize();<br>> time += incomingAudioChannels[0].GetDuration();<br>> <br>> for ( int i = 0; i < audioOutputs.Size(); i++ ){<br>> audioOutputs[i].Do( incomingAudioChannels[i] );<br>> }<br>> std::cout << "Durr: " << <br>> incomingAudioChannels[0].GetEndTime() << "\n"; // I added this line.<br>> }<br>><br>><br>> when I compile and run this program the first few lines output to <br>> stdout are:<br>> audioMixer examples # ./FilePlayback_example blue_serge.wav<br>> Durr: 23.22<br>> Durr: 23.2432<br>> Durr: 23.2664<br>> Durr: 23.2896<br>> Durr: 23.3128<br>> Durr: 23.3361<br>> Durr:
23.3593<br>><br>><br>> Shouldn't the first line be 0.002322 and aren't the subsequent lines <br>> off by 23.22?<br>> It's my understanding that GetEndTime() returns the end time of the <br>> audio in ms, and that the first chunk is only 1024 samples long. Am I <br>> misunderstanding the correct use?<br>><br>><br>> James<br>><br>><br>><br>><br>> ------------------------------------------------------------------------<br>> Get your own web address. <br>> <http: //us.rd.yahoo.com/evt="49678/*http://smallbusiness.yahoo.com/domains/?p=BESTDEAL"><br>> Have a HUGE year through Yahoo! Small Business. <br>> <http: //us.rd.yahoo.com/evt="49678/*http://smallbusiness.yahoo.com/domains/?p=BESTDEAL"> <br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> CLAM mailing list<br>> CLAM@iua.upf.es<br>>
http://www.iua.upf.es/mtg/clam<br><br></http:></http:></blockquote><br><p>
<hr size=1>TV dinner still cooling?<br><a href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/">Check out "Tonight's Picks"</a> on Yahoo! TV.