minor improvements
This commit is contained in:
@@ -61,7 +61,6 @@ bool AudioManager::IsRefreshing()
|
||||
return refreshing_devices_;
|
||||
}
|
||||
|
||||
#include <QDebug>
|
||||
void AudioManager::StartOutput(QIODevice *device)
|
||||
{
|
||||
if (output_ == nullptr) {
|
||||
@@ -75,7 +74,7 @@ void AudioManager::StartOutput(QIODevice *device)
|
||||
|
||||
void AudioManager::StopOutput()
|
||||
{
|
||||
if (output_ == nullptr) {
|
||||
if (output_ == nullptr || output_file_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -196,8 +196,10 @@ void ViewerWidget::PlayInternal(int speed)
|
||||
start_timestamp_ = ruler_->GetTime();
|
||||
playback_speed_ = speed;
|
||||
|
||||
/*QFile* file = new QFile("path-to-cache-audio");
|
||||
/*QFile* file = new QFile("path-to-file");
|
||||
if (file->open(QFile::ReadOnly)) {
|
||||
file->seek(static_cast<qint64>(qFloor(GetTime().toDouble() * 44100 * 2)) * static_cast<qint64>(sizeof(float)));
|
||||
|
||||
AudioManager::instance()->StartOutput(file);
|
||||
}*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user