diff --git a/README b/README
index 43f11f6c..1ead1390 100644
--- a/README
+++ b/README
@@ -42,4 +42,4 @@ Please see AUTHORS file for a full list of authors.
www.openshot.org | www.openshotstudios.com
####################################################################
- Copyright (c) 2008-2013 OpenShot Studios, LLC
\ No newline at end of file
+ Copyright (c) 2008-2013 OpenShot Studios, LLC
diff --git a/src/AudioReaderSource.cpp b/src/AudioReaderSource.cpp
index 1d5e70d6..8ca29b5e 100644
--- a/src/AudioReaderSource.cpp
+++ b/src/AudioReaderSource.cpp
@@ -131,7 +131,7 @@ void AudioReaderSource::GetMoreSamplesFromReader() {
// Get the next block of audio samples
void AudioReaderSource::getNextAudioBlock (const AudioSourceChannelInfo& info)
{
- cout << "getNextAudioBlock" << endl;
+ //cout << "getNextAudioBlock" << endl;
int buffer_samples = buffer->getNumSamples();
int buffer_channels = buffer->getNumChannels();
diff --git a/src/Qt/AudioPlaybackThread.cpp b/src/Qt/AudioPlaybackThread.cpp
index 04dc3ce9..a30d6858 100644
--- a/src/Qt/AudioPlaybackThread.cpp
+++ b/src/Qt/AudioPlaybackThread.cpp
@@ -75,7 +75,7 @@ namespace openshot
void AudioPlaybackThread::run()
{
- // Init audio device
+ // Init audio device
audioDeviceManager.initialise (
0, /* number of input channels */
numChannels, /* number of output channels */
@@ -106,9 +106,7 @@ namespace openshot
cout << "starting transport" << endl;
transport.start();
- //TODO: re-add this code !threadShouldExit() &&
- while (transport.isPlaying()) {
- cout << "... still playing" << endl;
+ while (!threadShouldExit() && transport.isPlaying()) {
sleep(1);
}
diff --git a/src/Qt/PlayerPrivate.cpp b/src/Qt/PlayerPrivate.cpp
index 4564c32d..4feba06a 100644
--- a/src/Qt/PlayerPrivate.cpp
+++ b/src/Qt/PlayerPrivate.cpp
@@ -56,18 +56,18 @@ namespace openshot
audioPlayback->setReader(reader);
audioPlayback->startThread(1);
- /*
videoPlayback->startThread(2);
- //tr1::shared_ptr frame = getFrame();
tr1::shared_ptr frame;
while (!threadShouldExit()) {
const Time t1 = Time::getCurrentTime();
- frame = audioPlayback->getFrame();
- if (!frame) {
- sleep(1); continue;
- //break;
+ if (!(frame = audioPlayback->getFrame())) {
+ if (true) {
+ sleep(1); continue;
+ } else {
+ break;
+ }
}
videoPlayback->frame = frame;
@@ -80,14 +80,14 @@ namespace openshot
int64 d = t2.toMilliseconds() - t1.toMilliseconds();
int st = int(ft - d + 0.5);
if (0 < ft - d) sleep(st);
- std::cout << "frametime: " << ft << " - " << d << " = " << st << std::endl;
+ //std::cout << "frametime: " << ft << " - " << d << " = " << st << std::endl;
}
if (videoPlayback->isThreadRunning()) videoPlayback->stopThread(-1);
- */
if (audioPlayback->isThreadRunning()) audioPlayback->stopThread(-1);
}
+ /*
tr1::shared_ptr PlayerPrivate::getFrame()
{
try {
@@ -101,6 +101,7 @@ namespace openshot
}
return tr1::shared_ptr();
}
+ */
bool PlayerPrivate::startPlayback()
{
diff --git a/src/Qt/PlayerPrivate.h b/src/Qt/PlayerPrivate.h
index ef8e8390..c19cc8a2 100644
--- a/src/Qt/PlayerPrivate.h
+++ b/src/Qt/PlayerPrivate.h
@@ -49,7 +49,7 @@ namespace openshot
bool startPlayback();
void stopPlayback(int timeOutMilliseconds = -1);
- tr1::shared_ptr getFrame();
+ //tr1::shared_ptr getFrame();
friend class QtPlayer;
};