From kde-multimedia Wed Jul 11 08:56:22 2001 From: Stefan Westerfeld Date: Wed, 11 Jul 2001 08:56:22 +0000 To: kde-multimedia Subject: Re: [PATCH] splayplayobject resampling X-MARC-Message: https://marc.info/?l=kde-multimedia&m=99484182623114 Hi! On Wed, Jul 11, 2001 at 01:30:59AM +0200, Stefan Westerfeld wrote: > I've finally implemented some resampling code for the SPlayPlayObject. The > following works now: > > % kaboodle http://swr3.mp3.unbn.unit.net:80/ > > [...] > - I hear artefacts caused during decoding, these are not resampling based, > because they also occur when playing a 44100 Hz mp3 locally I just spend a little more time debugging this, and found that KIOInputStream was causing some problems. It used (kdelibs/arts/kde/kioinputstream_impl.cpp): QDataStream dataStream(m_data, IO_WriteOnly | IO_Append); dataStream << data; to concatenate the data sent by the KIO::Job. The problem is that the << operator does append to the stream, which in turn means that the decoder will get the data with a lot of numbers in it that don't belong there. I changed this now to QDataStream dataStream(m_data, IO_WriteOnly | IO_Append); dataStream.writeRawBytes(data.data(), data.size()); which works a lot better. However, I can still observe occasional hiccups although I now have verified that the data that SPlayPlayObject gets is now bytewise identical with the original mp3 the server sends. Cu... Stefan -- -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany KDE Developer, project infos at http://space.twc.de/~stefan/kde *- _______________________________________________ Kde-multimedia mailing list Kde-multimedia@master.kde.org http://master.kde.org/mailman/listinfo/kde-multimedia