[Tutor] pcm -> seconds
Andreas Zwinkau
andi@buxach.de
Sun Jul 20 09:21:35 2003
ave
I am programming a JukeBox, currently i try to figur out how to make a
song fade out? I can change the sound volume no problem (audioop
module), but the problem is the timing.
There is a threaded class, which streams the data as long a variable is
set. Now i would have to let a counter tick in the background to see how
much of the song is played. The stream is a 16bit stereo PCM stream. Is
the amount of time 4kb of that stream need to play fix? So can i count
4kb = 1,4314 (value just imagined) seconds? Or should i figure out the
amount of stream data i get from a mp3?
Or should i just implement yet another thread to count the seconds?
All suggestions are welcome for this problem :)
mfg
Andreas Zwinkau
| web: andi.dasstellenwirinsinternet.de
| mail: andi@buxach.de
| jabber: beza1e1@amessage.de