diff -r 41300fa6a67c -r 3b1da2848fc7 examples/multimedia/audiooutput/audiooutput.cpp --- a/examples/multimedia/audiooutput/audiooutput.cpp Tue Feb 02 00:43:10 2010 +0200 +++ b/examples/multimedia/audiooutput/audiooutput.cpp Fri Feb 19 23:40:16 2010 +0200 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -103,10 +103,10 @@ qint64 Generator::readData(char *data, qint64 maxlen) { int len = maxlen; - if(len > 16384) + if (len > 16384) len = 16384; - if(len < (SECONDS*SYSTEM_FREQ*2)-pos) { + if (len < (SECONDS*SYSTEM_FREQ*2)-pos) { // Normal memcpy(data,t+pos,len); pos+=len; @@ -212,15 +212,15 @@ void AudioTest::status() { - qWarning()<<"byteFree = "<bytesFree()<<" bytes, elapsedUSecs = "<elapsedUSecs()<<", processedUSecs = "<processedUSecs(); + qWarning() << "byteFree = " << audioOutput->bytesFree() << " bytes, elapsedUSecs = " << audioOutput->elapsedUSecs() << ", processedUSecs = " << audioOutput->processedUSecs(); } void AudioTest::writeMore() { - if(!audioOutput) + if (!audioOutput) return; - if(audioOutput->state() == QAudio::StoppedState) + if (audioOutput->state() == QAudio::StoppedState) return; int l; @@ -229,9 +229,9 @@ int chunks = audioOutput->bytesFree()/audioOutput->periodSize(); while(chunks) { l = gen->read(buffer,audioOutput->periodSize()); - if(l > 0) + if (l > 0) out = output->write(buffer,l); - if(l != audioOutput->periodSize()) + if (l != audioOutput->periodSize()) break; chunks--; } @@ -259,24 +259,24 @@ void AudioTest::togglePlay() { // toggle suspend/resume - if(audioOutput->state() == QAudio::SuspendedState) { - qWarning()<<"status: Suspended, resume()"; + if (audioOutput->state() == QAudio::SuspendedState) { + qWarning() << "status: Suspended, resume()"; audioOutput->resume(); button2->setText("Click To Suspend"); } else if (audioOutput->state() == QAudio::ActiveState) { - qWarning()<<"status: Active, suspend()"; + qWarning() << "status: Active, suspend()"; audioOutput->suspend(); button2->setText("Click To Resume"); } else if (audioOutput->state() == QAudio::StoppedState) { - qWarning()<<"status: Stopped, resume()"; + qWarning() << "status: Stopped, resume()"; audioOutput->resume(); button2->setText("Click To Suspend"); } else if (audioOutput->state() == QAudio::IdleState) { - qWarning()<<"status: IdleState"; + qWarning() << "status: IdleState"; } } void AudioTest::state(QAudio::State state) { - qWarning()<<" state="<